:root {
    --bg-dark: #f8fafc;
    --bg-panel: #ffffff;
    --primary: #ef4444; /* Petpooja Red */
    --accent: #dc2626;  /* Darker Red */
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --danger: #ef4444;
    --success: #10b981;
}

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

body {
    background: var(--bg-dark);
    color: var(--text-main);
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}

/* Glassmorphism Panels */
.glass-panel {
    background: var(--bg-panel);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    border-radius: 12px;
    border: 1px solid var(--border);
}

/* Header */
header {
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    border-bottom: 1px solid var(--border);
    background: var(--primary);
    color: white;
}

.logo { font-size: 18px; font-weight: 800; color: white; }

.header-controls { display: flex; gap: 10px; }
.btn { background: linear-gradient(135deg, var(--primary), var(--accent)); color: white; padding: 10px 16px; border: none; border-radius: 8px; cursor: pointer; font-weight: 700; font-size: 14px; transition: all 0.3s ease; box-shadow: 0 4px 10px rgba(239, 68, 68, 0.3); }
.btn:hover { transform: translateY(-2px); box-shadow: 0 6px 15px rgba(239, 68, 68, 0.5); }

.btn-outline { background: white; border: 1px solid var(--border); color: var(--primary); padding: 8px 14px; border-radius: 6px; cursor: pointer; font-weight: 600; font-size: 13px; transition: all 0.3s ease; box-shadow: 0 2px 4px rgba(0,0,0,0.05); }
.btn-outline:hover { background: #fef2f2; border-color: var(--primary); transform: translateY(-1px); box-shadow: 0 4px 8px rgba(239, 68, 68, 0.15); }

/* Main Layout */
.main-container {
    display: flex;
    flex: 1;
    overflow: hidden;
    padding: 12px;
    gap: 12px;
}

.sidebar-section {
    width: 140px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.vertical-scroll {
    overflow-y: auto;
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 12px;
}
.vertical-scroll::-webkit-scrollbar { width: 4px; }
.vertical-scroll::-webkit-scrollbar-thumb { background: rgba(239,68,68,0.3); }

.category-btn {
    padding: 10px 8px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: transparent;
    color: var(--text-main);
    cursor: pointer;
    white-space: normal;
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.2s;
}
.category-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.menu-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 12px;
    overflow-y: auto;
    padding-right: 6px;
    align-content: start;
    flex: 1;
}
.items-grid::-webkit-scrollbar { width: 4px; }
.items-grid::-webkit-scrollbar-thumb { background: rgba(239,68,68,0.3); border-radius: 2px; }

.item-card {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 120px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}
.item-card:hover { transform: translateY(-4px); box-shadow: 0 10px 20px rgba(0,0,0,0.1); border-color: var(--primary); }
.item-card:active { transform: translateY(0); }

.item-icon-wrapper {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    margin-bottom: 10px;
    color: white;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.item-name { font-weight: 800; font-size: 13px; margin-bottom: 5px; line-height: 1.2; color: #1e293b; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.item-price { color: var(--primary); font-weight: 900; font-size: 14px; background: rgba(239, 68, 68, 0.1); padding: 2px 8px; border-radius: 20px; }

/* Right - Cart */
.cart-section {
    flex: 2;
    display: flex;
    flex-direction: column;
    min-width: 300px;
}

.cart-header { padding: 12px; border-bottom: 1px solid var(--border); font-size: 15px; font-weight: 700; display:flex; justify-content:space-between; align-items:center;}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
}
.cart-items::-webkit-scrollbar { width: 4px; }
.cart-items::-webkit-scrollbar-thumb { background: rgba(239,68,68,0.3); }

.cart-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px;
    background: #fef2f2;
    border-radius: 8px;
    margin-bottom: 6px;
    border: 1px solid #fca5a5;
}
.cart-row-title { flex: 2; font-weight: 600; font-size: 12px; }
.cart-row-qty { flex: 1; display:flex; align-items:center; gap:6px; font-size:13px;}
.qty-btn { background: white; border:1px solid #fca5a5; color:var(--primary); width:20px; height:20px; border-radius:4px; cursor:pointer; font-weight:bold; }
.qty-btn:hover { background: var(--primary); color:white; }
.cart-row-price { flex: 1; text-align: right; font-weight: 700; color:var(--accent); font-size:13px;}

.cart-footer {
    padding: 12px;
    border-top: 1px solid var(--border);
    background: #ffffff;
    border-radius: 0 0 12px 12px;
}
.summary-row { display: flex; justify-content: space-between; margin-bottom: 6px; color: var(--text-muted); font-size: 13px; }
.summary-row.total { font-size: 20px; font-weight: 800; color: var(--primary); margin-top: 8px; margin-bottom: 12px; }

.btn-pay {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--accent), #059669);
    color: white;
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(16, 185, 129, 0.4);
    transition: 0.2s;
}
.btn-pay:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(16, 185, 129, 0.6); }

/* Type indicators */
.type-dot { width: 8px; height: 8px; border-radius: 50%; position: absolute; top: 8px; right: 8px; }
.type-veg { background-color: #10b981; box-shadow: 0 0 5px #10b981; }
.type-nonveg { background-color: #ef4444; box-shadow: 0 0 5px #ef4444; }

/* Toast */
#toast { position: fixed; bottom: -50px; left: 50%; transform: translateX(-50%); background: var(--primary); color: white; padding: 12px 24px; border-radius: 8px; font-weight: 600; transition: bottom 0.3s; z-index: 1000; box-shadow: 0 5px 15px rgba(0,0,0,0.3); }
#toast.show { bottom: 20px; }
/* Modifier Modal */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(5px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}
.modal-box {
    background: var(--bg-dark);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
    width: 400px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}
.modal-box h3 {
    margin-bottom: 16px;
    color: var(--text-main);
    border-bottom: 1px solid var(--border);
    padding-bottom: 12px;
}
.mod-list-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}
.mod-label {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 16px;
    cursor: pointer;
    background: rgba(255,255,255,0.05);
    padding: 12px;
    border-radius: 8px;
    border: 1px solid var(--border);
    transition: 0.2s;
}
.mod-label:hover { background: rgba(255,255,255,0.1); }
.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}
