   :root {
    --primary-red: #E7272D;
    --primary-red-hover: #c91f25;
    --bg-light: #F5F6FA;
    --bg-white: #FFFFFF;
    --text-dark: #1a1a2e;
    --text-muted: #6b7280;
    --text-light: #9ca3af;
    --border-color: #e5e7eb;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.07);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.1);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-light);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--text-dark);
    line-height: 1.5;
}

.app-layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 260px;
    height: 100vh;
    background: var(--bg-white);
    position: fixed;
    top: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border-right: 1px solid var(--border-color);
    z-index: 100;
}

.sidebar-top {
    padding: 32px 24px;
}

.brand {
    font-size: 28px;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.brand-red {
    color: var(--primary-red);
}

.brand-sub {
    font-size: 14px;
    font-weight: 400;
    color: var(--text-muted);
}

.side-nav {
    margin-top: 40px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    font-size: 15px;
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
    margin-bottom: 4px;
}

.nav-item i {
    width: 20px;
    text-align: center;
}

.nav-item:hover {
    background-color: #fef2f2;
    color: var(--primary-red);
}

.nav-item.active {
    background-color: var(--primary-red);
    color: white;
}

.vendor-info {
    padding: 24px;
    border-top: 1px solid var(--border-color);
    background: #fafafa;
}

.vendor-name {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-dark);
}

.vendor-phone {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 2px;
}

.main-content {
    margin-left: 260px;
    flex: 1;
    display: flex;
    min-height: 100vh;
}

.content-area {
    flex: 1;
    padding: 32px;
    max-width: calc(100% - 340px);
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 32px;
}

.page-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 4px;
}

.page-subtitle {
    font-size: 15px;
    color: var(--text-muted);
}

.search-box {
    position: relative;
}

.search-box .search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    font-size: 14px;
}

.search-box input {
    width: 240px;
    padding: 12px 16px 12px 42px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 14px;
    background: var(--bg-white);
    transition: all 0.2s ease;
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary-red);
    box-shadow: 0 0 0 3px rgba(231, 39, 45, 0.1);
}

.search-box input::placeholder {
    color: var(--text-light);
}

.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.menu-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.menu-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.menu-card-image {
    position: relative;
    width: 100%;
    height: 180px;
    background: #f3f4f6;
    overflow: hidden;
}

.menu-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.menu-card-image .placeholder-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 48px;
    color: #d1d5db;
}

.menu-tags {
    position: absolute;
    top: 12px;
    left: 12px;
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.menu-tag {
    padding: 4px 10px;
    background: var(--bg-white);
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-dark);
    box-shadow: var(--shadow-sm);
}

.menu-tag.vegetarian {
    background: #dcfce7;
    color: #166534;
}

.menu-tag.spicy {
    background: #fef3c7;
    color: #92400e;
}

.menu-card-content {
    padding: 16px;
}

.menu-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 8px;
}

.menu-card-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-dark);
    line-height: 1.3;
}

.menu-card-price {
    font-size: 16px;
    font-weight: 700;
    color: var(--primary-red);
    white-space: nowrap;
}

.menu-card-description {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.menu-card-action {
    margin-top: 16px;
}

.add-btn {
    width: 100%;
    padding: 12px;
    background: var(--primary-red);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.add-btn:hover {
    background: var(--primary-red-hover);
}

.cart-sidebar {
    width: 340px;
    padding: 32px 32px 32px 0;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}

.cart-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.cart-header {
    background: linear-gradient(135deg, #fef2f2 0%, #fff5f5 100%);
    padding: 16px 20px;
    border-bottom: 1px solid #fecaca;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--primary-red);
    font-weight: 700;
    font-size: 16px;
}

.cart-items {
    max-height: 350px;
    overflow-y: auto;
    padding: 16px;
}

.cart-items::-webkit-scrollbar {
    width: 4px;
}

.cart-items::-webkit-scrollbar-thumb {
    background: #e5e7eb;
    border-radius: 10px;
}

.empty-cart {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-light);
}

.empty-cart i {
    font-size: 48px;
    margin-bottom: 12px;
    display: block;
}

.empty-cart p {
    font-size: 14px;
}

.cart-item {
    padding: 14px 0;
    border-bottom: 1px solid var(--border-color);
}

.cart-item:last-child {
    border-bottom: none;
}

.cart-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.cart-item-info {
    flex: 1;
}

.cart-item-name {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 8px;
}

.cart-item-qty {
    color: var(--primary-red);
    font-weight: 700;
}

.cart-item-price {
    font-weight: 700;
    color: var(--primary-red);
    font-size: 14px;
}

.cart-item-notes {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
    font-style: italic;
}

.cart-item-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 10px;
}

.cart-qty-control {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f9fafb;
    border-radius: var(--radius-sm);
    padding: 4px;
}

.cart-qty-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid var(--primary-red);
    background: var(--bg-white);
    color: var(--primary-red);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    transition: all 0.2s ease;
}

.cart-qty-btn:hover {
    background: var(--primary-red);
    color: white;
}

.cart-qty-value {
    width: 32px;
    text-align: center;
    font-weight: 600;
    font-size: 14px;
}

.cart-remove-btn {
    background: none;
    border: none;
    color: var(--primary-red);
    cursor: pointer;
    padding: 6px;
    font-size: 14px;
    transition: all 0.2s ease;
}

.cart-remove-btn:hover {
    color: var(--primary-red-hover);
    transform: scale(1.1);
}

.cart-summary {
    padding: 20px;
    background: #fafafa;
    border-top: 1px solid var(--border-color);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 14px;
    color: var(--text-muted);
}

.summary-row.total {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-dark);
    margin-top: 16px;
    padding-top: 16px;
    border-top: 2px dashed var(--border-color);
}

.summary-row.total span:last-child {
    color: var(--primary-red);
}

.checkout-btn {
    width: 100%;
    padding: 16px;
    background: var(--primary-red);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    margin-top: 16px;
    transition: all 0.2s ease;
}

.checkout-btn:hover {
    background: var(--primary-red-hover);
}

.checkout-btn:disabled {
    background: #d1d5db;
    cursor: not-allowed;
}

.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 20px;
}

.modal-content {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 480px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: var(--shadow-lg);
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: var(--bg-white);
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    z-index: 10;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: #f3f4f6;
    color: var(--text-dark);
}

.modal-body {
    padding: 0;
}

.modal-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.modal-details {
    padding: 24px;
}

.modal-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.modal-description {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 16px;
}

.modal-tags {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 600;
    font-size: 14px;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.form-group label i {
    margin-right: 6px;
    color: var(--primary-red);
}

.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 14px;
    resize: none;
    font-family: inherit;
    transition: all 0.2s ease;
}

.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-red);
    box-shadow: 0 0 0 3px rgba(231, 39, 45, 0.1);
}

.quantity-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.quantity-row label {
    font-weight: 600;
    font-size: 14px;
}

.quantity-control {
    display: flex;
    align-items: center;
    gap: 12px;
}

.qty-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid var(--primary-red);
    background: var(--bg-white);
    color: var(--primary-red);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all 0.2s ease;
}

.qty-btn:hover {
    background: var(--primary-red);
    color: white;
}

.quantity-control input {
    width: 50px;
    text-align: center;
    border: none;
    font-size: 18px;
    font-weight: 700;
    color: var(--text-dark);
    background: transparent;
}

.modal-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.total-price {
    font-size: 14px;
    color: var(--text-muted);
}

.price-value {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-red);
    margin-left: 8px;
}

.add-to-cart-btn {
    padding: 14px 28px;
    background: var(--primary-red);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.add-to-cart-btn:hover {
    background: var(--primary-red-hover);
}

.loading {
    text-align: center;
    padding: 60px;
    color: var(--text-muted);
    font-size: 16px;
}

.loading i {
    margin-right: 8px;
    color: var(--primary-red);
}

.alert {
    padding: 16px 20px;
    border-radius: var(--radius-md);
    margin-bottom: 24px;
    font-size: 14px;
}

.alert.success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

@media (max-width: 1200px) {
    .cart-sidebar {
        width: 300px;
    }
    
    .content-area {
        max-width: calc(100% - 300px);
    }
}

@media (max-width: 992px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .main-content {
        margin-left: 0;
        flex-direction: column;
    }
    
    .content-area {
        max-width: 100%;
    }
    
    .cart-sidebar {
        width: 100%;
        position: fixed;
        bottom: 0;
        left: 0;
        height: auto;
        padding: 16px;
        z-index: 100;
    }
}

@media (max-width: 768px) {
    .page-header {
        flex-direction: column;
        gap: 16px;
    }
    
    .search-box input {
        width: 100%;
    }
    
    .menu-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 16px;
    }
}
