/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

:root {
    --primary-color: #f43f5e; /* rose-500 */
    --secondary-color: #14b8a6; /* teal-500 */
    --accent-color: #f59e0b; /* amber-500 */
    --background-color: #f9fafb; /* gray-50 */
    --text-color: #1f2937; /* gray-800 */
    --light-gray: #f3f4f6; /* gray-100 */
    --border-color: #e5e7eb; /* gray-200 */
}

body {
    background-color: var(--background-color);
    color: var(--text-color);
    min-height: 100vh;
}

/* Header Styles */
header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 2rem 1rem;
    text-align: center;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

/* Order Details Form */
.order-details {
    background-color: white;
    padding: 1rem;
    margin: 1rem auto;
    max-width: 500px;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.order-details input {
    width: 100%;
    padding: 0.8rem;
    margin: 0.5rem 0;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-size: 1rem;
}

/* Categories */
.categories {
    display: flex;
    overflow-x: auto;
    padding: 1rem;
    gap: 1rem;
    background-color: white;
    margin: 1rem 0;
    scrollbar-width: thin;
}

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

.categories::-webkit-scrollbar-thumb {
    background-color: var(--border-color);
    border-radius: 4px;
}

.category-btn {
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 25px;
    background-color: var(--light-gray);
    color: var(--text-color);
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.3s ease;
}

.category-btn.active {
    background-color: var(--primary-color);
    color: white;
}

/* Subcategories */
.subcategories-container {
    background-color: white;
    padding: 1rem;
    margin-bottom: 1rem;
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    scrollbar-width: thin;
    display: none;
}

.subcategories-container::-webkit-scrollbar {
    height: 4px;
}

.subcategories-container::-webkit-scrollbar-thumb {
    background-color: var(--border-color);
    border-radius: 4px;
}

.subcategory-btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 15px;
    background-color: var(--light-gray);
    color: var(--text-color);
    font-size: 0.9rem;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.3s ease;
}

.subcategory-btn.active {
    background-color: var(--secondary-color);
    color: white;
}

/* Menu Grid */
.menu-container {
    padding: 1rem;
    max-width: 1200px;
    margin: 0 auto;
}

.menu {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

.menu-item {
    background-color: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
    position: relative;
}

.menu-item:hover {
    transform: translateY(-5px);
}

.menu-item.popular {
    border: 2px solid var(--primary-color);
}

.menu-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.menu-item-info {
    padding: 1rem;
}

.menu-item h3 {
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.menu-item-description {
    color: #6b7280; /* gray-500 */
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.menu-item-price {
    color: var(--primary-color);
    font-weight: bold;
    font-size: 1.2rem;
}

.add-to-cart {
    background-color: var(--accent-color);
    color: white;
    border: none;
    padding: 0.8rem;
    width: 100%;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin-top: 1rem;
}

.add-to-cart:hover {
    background-color: #d97706; /* amber-600 */
}

/* Dietary Indicators */
.dietary-info {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0.5rem 0;
}

.dietary-badge {
    padding: 0.2rem 0.5rem;
    border-radius: 15px;
    font-size: 0.7rem;
    display: inline-block;
    color: white;
}

.veg-badge {
    background-color: #22c55e; /* green-500 */
}

.healthy-badge {
    background-color: #3b82f6; /* blue-500 */
}

.special-badge {
    background-color: var(--accent-color);
}

/* Spice Level */
.spice-level {
    display: flex;
    gap: 0.3rem;
    margin: 0.5rem 0;
}

.spice-icon {
    color: #d1d5db; /* gray-300 */
    font-size: 0.8rem;
}

.spice-icon.active {
    color: #ef4444; /* red-500 */
}

/* Popular Badge */
.popular-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: var(--primary-color);
    color: white;
    padding: 0.3rem 0.6rem;
    border-radius: 15px;
    font-size: 0.8rem;
    z-index: 1;
}

/* Customization Select */
.customize-select {
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-size: 0.9rem;
    cursor: pointer;
}

/* Price Section */
.price-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 1rem 0;
}

/* Cart Styles */
.cart {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100vh;
    background-color: white;
    box-shadow: -2px 0 5px rgba(0,0,0,0.1);
    transition: right 0.3s ease;
    z-index: 1000;
}

.cart.active {
    right: 0;
}

.cart-header {
    background-color: var(--primary-color);
    color: white;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.close-cart {
    cursor: pointer;
    font-size: 1.5rem;
}

.cart-items {
    padding: 1rem;
    max-height: calc(100vh - 250px);
    overflow-y: auto;
}

.cart-item {
    display: flex;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.cart-item img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 5px;
    margin-right: 1rem;
}

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

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

.quantity-btn {
    background-color: var(--light-gray);
    border: none;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 3px;
}

.cart-total {
    position: absolute;
    bottom: 0;
    width: 100%;
    padding: 1rem;
    background-color: white;
    box-shadow: 0 -2px 5px rgba(0,0,0,0.1);
}

#place-order {
    background-color: var(--accent-color);
    color: white;
    border: none;
    padding: 1rem;
    width: 100%;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 1rem;
    transition: background-color 0.3s ease;
}

#place-order:hover {
    background-color: #d97706; /* amber-600 */
}

/* Cart Toggle Button */
.cart-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    background-color: var(--primary-color);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    z-index: 1001;
    border: none;
}

.cart-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: var(--accent-color);
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
}

/* Empty Cart Message */
.empty-cart-message {
    text-align: center;
    color: #6b7280; /* gray-500 */
    padding: 2rem 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .cart {
        width: 100%;
        right: -100%;
    }

    .menu {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 1rem;
    }

    .order-details {
        margin: 1rem;
    }
}

@media (max-width: 480px) {
    .menu {
        grid-template-columns: 1fr;
    }
}

.restaurant-selection {
    text-align: center;
    margin: 20px;
}

#restaurantSelect {
    padding: 10px;
    font-size: 16px;
}
