﻿
.search-container {
    padding: 0.8rem 1rem;
    background-color: white;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 998;
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 1rem;
    color: var(--light-text);
    font-size: 0.9rem;
}

.search-input {
    width: 100%;
    padding: 0.6rem 1rem 0.6rem 2.5rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.9rem;
    outline: none;
    transition: all 0.3s ease;
}

    .search-input:focus {
        border-color: var(--primary);
        box-shadow: 0 0 0 2px rgba(203, 32, 45, 0.2);
    }

.clear-search {
    position: absolute;
    right: 1rem;
    background: none;
    border: none;
    color: var(--light-text);
    cursor: pointer;
    padding: 0.25rem;
    transition: all 0.2s;
}

    .clear-search:hover {
        color: var(--primary);
    }

/* Adjust category tabs position to account for sticky search */
.category-tabs {
    top: 56px; /* Height of search container */
}

:root {
    --primary: #2a5bd7; /* Deep blue */
    --accent: #5a8bf2; /* Lighter blue */
    --success: #28a745; /* Keep green for success */
    --veg: #4CAF50; /* Keep green for veg */
    --non-veg: #F44336; /* Keep red for non-veg */
    --text: #1c1c1c; /* Keep dark text */
    --light-text: #6c757d; /* Keep light text */
    --bg: #f8fafd; /* Very light blue background */
    --card-bg: #ffffff; /* White cards */
    --section-bg: #f1f5fe; /* Light blue section background */
    --border: #d1ddf0; /* Soft blue border */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg);
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--text);
    padding-bottom: 120px;
}

/* Restaurant Header */
.restaurant-header {
    background: white;
    padding: 0rem 0rem 0;
    border-bottom: 1px solid var(--border);
}

.restaurant-info {
    display: flex;
    gap: 1.5rem;
    padding-bottom: 1rem;
}

.restaurant-image {
    width: 76px;
    height: 53px;
    border-radius: 12px;
    object-fit: cover;
    border: 1px solid var(--border);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.restaurant-details {
    flex: 1;
    font-size: 10px;
}

.restaurant-name {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text);
}

.restaurant-cuisines {
    color: var(--light-text);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.restaurant-location {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--light-text);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.restaurant-rating {
    display: inline-flex;
    align-items: center;
    background-color: #48c479;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
}

.restaurant-meta {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.85rem;
    color: var(--light-text);
}

/* Offer Banner */
.offer-banner {
    background: linear-gradient(to right, #f8f4e5, #faf6ea);
    padding: 0.2rem;
    margin: 0;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.offer-icon {
    color: var(--primary);
    font-size: 1.2rem;
}

.offer-text {
    font-size: 0.9rem;
    font-weight: 500;
}

/* Category Tabs */
.category-tabs {
    background-color: white;
    padding: 0.8rem 1rem;
    position: sticky;
    top: 0;
    z-index: 999;
    overflow-x: auto;
    white-space: nowrap;
    display: flex;
    gap: 0.8rem;
    scrollbar-width: none;
    border-bottom: 1px solid var(--border);
}

    .category-tabs::-webkit-scrollbar {
        display: none;
    }

/* .category-btn {
                    flex-shrink: 0;
                    padding: 0.5rem 1rem;
                    border-radius: 18px;
                    background-color: white;
                    border: 1px solid var(--border);
                    color: var(--text);
                    font-weight: 500;
                    transition: all 0.3s ease;
                    font-size: 0.7rem;
                } */

.category-btn {
    flex-shrink: 0;
    padding: 0.5rem 1rem;
    border-radius: 0px;
    background-color: white;
    border: 1px solid var(--border);
    color: var(--text);
    font-weight: 500;
    transition: all 0.3s ease;
    font-size: 0.8rem;
}

    .category-btn.active {
        background-color: var(--primary);
        color: white;
        border-color: var(--primary);
    }

/* Menu Items */
.menu-container {
    /* padding: 1rem; */
}

.category-section {
    margin-bottom: 2rem;
}

.category-title {
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 0rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px dashed var(--border);
}

.menu-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.5rem;
}

.item-card {
    background-color: var(--card-bg);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    display: flex;
    border: 1px solid var(--border);
    padding: 12px;
    gap: 10px;
    align-items: stretch;
    justify-content: space-around;
    align-content: stretch;
    flex-direction: row;
    width: 100%;
}

.item-image-container {
    position: relative;
    flex-shrink: 0;
}

.item-image {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: 8px;
}

.item-tag {
    position: absolute;
    top: 1px;
    left: 1px;
    padding: 0rem 0rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    color: white;
    text-transform: uppercase;
    z-index: 2;
    margin-top: -7px;
    margin-left: -7px;
    height: 16px;
    width: 15px;
}


.veg-tag {
    background-color: var(--veg);
}

.nonveg-tag {
    background-color: var(--non-veg);
}

.item-details {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.item-header {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
}

.item-title {
    font-weight: 600;
    font-size: 10.5px;
    margin-bottom: 0.3rem;
    color: var(--text);
    margin-left: 3px;
}

.item-price {
    font-weight: 600;
    color: var(--text);
    font-size: 10px;
    white-space: nowrap;
    margin-bottom: 20px;
}

.item-desc {
    color: var(--light-text);
    font-size: 9px;
    margin-bottom: 2.9rem;
    line-height: 0.4;
    flex-grow: 1;
}

.item-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-left: 75%;
    margin-top: -80px;
}

.add-btn {
    background-color: var(--primary);
    color: white;
    border: none;
    padding: 0.5rem 1.8rem;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s;
    font-size: 10px;
}

    .add-btn:active {
        transform: scale(0.95);
    }

.quantity-controls {
    display: flex;
    align-items: center;
    /* gap: 0.5rem; */
}

/* .qty-btn {
                    width: 28px;
                    height: 28px;
                    border-radius: 50%;
                    display: flex;
                    align-items: center;
                    justify-content: center;
                    background-color: white;
                    color: var(--primary);
                    border: 1px solid var(--primary);
                    font-weight: bold;
                    font-size: 1rem;
                    transition: all 0.2s;
                } */
.qty-btn {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: white;
    color: var(--primary);
    border: 1px solid var(--primary);
    font-weight: bold;
    font-size: 0.8rem;
    transition: all 0.2s;
}

    .qty-btn:active {
        transform: scale(0.95);
    }

.qty-display {
    font-weight: 600;
    font-size: 0.7rem;
    min-width: 20px;
    text-align: center;
}

/* Cart summary */
.cart-summary {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: white;
    padding: 0.8rem 1rem;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    transform: translateY(0);
    transition: transform 0.3s ease;
    border-top: 1px solid var(--border);
}

    .cart-summary.hidden {
        transform: translateY(100%);
    }

.cart-info {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.total-items {
    font-weight: 600;
    background-color: var(--primary);
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
}

.cart-text {
    font-weight: 500;
    font-size: 0.8rem;
}

.cart-price {
    font-weight: 600;
    font-size: 0.8rem;
}

.view-cart-btn {
    background-color: var(--primary);
    color: white;
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 6px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.7rem;
    transition: all 0.2s;
}

    .view-cart-btn:active {
        transform: scale(0.98);
    }

/* Loading and error states */
.loading-container, .error-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    padding: 2rem;
}

.spinner {
    width: 3rem;
    height: 3rem;
    border: 0.25em solid var(--primary);
    border-right-color: transparent;
    border-radius: 50%;
    animation: spinner 0.75s linear infinite;
}

@@keyframes spinner {
    to {
        transform: rotate(360deg);
    }
}

/* Responsive adjustments */
@@media (min-width: 768px) {
    .restaurant-image {
        width: 150px;
        height: 150px;
    }

    .restaurant-name {
        font-size: 1.8rem;
    }

    .menu-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

    .item-card {
        padding: 0;
    }
}

@@media (min-width: 992px) {
    .restaurant-header {
        padding: 1.5rem 2rem 0;
    }

    .menu-container {
        padding: 1.5rem 2rem;
    }

    .category-section {
        margin-bottom: 2.5rem;
    }

    .category-title {
        font-size: 12px;
    }
}

/* Empty states */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--light-text);
}

    .empty-state i {
        font-size: 3rem;
        color: #ddd;
        margin-bottom: 1rem;
    }

/* Cart panel styles */
.cart-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    max-width: 400px;
    height: 100vh;
    background: white;
    box-shadow: -5px 0 15px rgba(0,0,0,0.1);
    z-index: 1100;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    display: flex;
    flex-direction: column;
}

    .cart-panel.open {
        transform: translateX(0);
    }

.cart-header {
    background: var(--primary);
    color: white;
    padding: 0rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.close-cart {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    transition: transform 0.2s;
}

    .close-cart:active {
        transform: scale(0.9);
    }

.cart-items {
    flex-grow: 1;
    overflow-y: auto;
    padding: 0.5rem;
}

.cart-item {
    display: flex;
    align-items: flex-start;
    padding: 0.3rem 0;
    border-bottom: 1px solid var(--border);
}

.cart-item-img {
    width: 70px;
    height: 70px;
    border-radius: 8px;
    object-fit: cover;
    margin-right: 1rem;
}

.cart-item-details {
    flex-grow: 1;
}

.cart-item-name {
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: var(--text);
    font-size: 10px;
}

.cart-item-price {
    color: var(--text);
    font-weight: 600;
    font-size: 10px;
}

.cart-item-qty {
    display: flex;
    align-items: center;
    margin-top: 0.8rem;
}

.cart-item-qty-btn {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: white;
    color: var(--primary);
    border: 1px solid var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    transition: all 0.2s;
    font-size: 0.8rem;
}

    .cart-item-qty-btn:active {
        transform: scale(0.9);
    }

.cart-item-qty-display {
    margin: 0 0.8rem;
    min-width: 20px;
    text-align: center;
    font-weight: 600;
    font-size: 0.8rem;
}

.cart-footer {
    padding: 1.2rem;
    background: #f8f9fa;
    border-top: 1px solid var(--border);
}

.cart-summary-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.8rem;
    font-size: 0.8rem;
}

.cart-label {
    color: var(--light-text);
}

.cart-value {
    font-weight: 500;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    font-weight: 700;
    margin: 0rem 0;
    padding-top: 0rem;
    border-top: 1px dashed var(--border);
}

/* .checkout-btn {
                    width: 100%;
                    padding: 1rem;
                    background: var(--primary);
                    color: white;
                    border: none;
                    border-radius: 8px;
                    font-weight: 600;
                    font-size: 0.9rem;
                    transition: all 0.2s;
                } */

.checkout-btn {
    width: 100%;
    padding: 0.5rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s;
    margin-bottom: 55px;
}

    .checkout-btn:active {
        transform: scale(0.98);
    }

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

    .overlay.active {
        display: block;
        opacity: 1;
    }

/* Empty cart styling */
.empty-cart {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--light-text);
}

    .empty-cart i {
        font-size: 3rem;
        margin-bottom: 1.5rem;
        color: #ddd;
    }


/* .item-tag {
                    display: flex;
                    align-items: center;
                    font-weight: bold;
                    font-size: 14px;
                    padding: 4px 8px;
                    border-radius: 4px;
                    width: fit-content;
                    margin: 8px;
                }
         */
.symbol {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    border: 2px solid;
    margin-left: 3px;
    margin-bottom: 2px;
    display: inline-block;
    position: relative;
}

.veg-tag .symbol {
    background-color: green;
    border-color: green;
}

.nonveg-tag .symbol {
    background-color: red;
    border-color: red;
}

.veg-tag {
    color: green;
    border: 1px solid green;
    background-color: #eafae9;
}

.nonveg-tag {
    color: red;
    border: 1px solid red;
    background-color: #fdeaea;
}


