Restaurant Menu Html Css Codepen May 2026
// State: currently active filter category (null = show all) let activeCategory = null; // null means "All"
body background: #f9f6ef; font-family: 'Inter', sans-serif; color: #2c2418; line-height: 1.4; scroll-behavior: smooth; restaurant menu html css codepen
// Additional feature: gentle animation for initial load function init() renderFilters(); renderMenuItems(); // State: currently active filter category (null =
/* category filter (optional interactive tabs) */ .filter-tabs display: flex; flex-wrap: wrap; justify-content: center; gap: 0.8rem; margin-bottom: 2.8rem; .filter-btn background: transparent; border: 1.5px solid #e2cfb5; padding: 0.6rem 1.6rem; font-family: 'Inter', sans-serif; font-weight: 500; font-size: 0.9rem; border-radius: 60px; cursor: pointer; transition: all 0.2s ease; color: #4f3a28; background: white; .filter-btn i margin-right: 6px; font-size: 0.85rem; .filter-btn.active background: #c17b4c; border-color: #c17b4c; color: white; box-shadow: 0 6px 12px -8px rgba(193,123,76,0.4); .filter-btn:hover:not(.active) background: #f2e6db; border-color: #cb9e78; .filter-btn background: transparent
/* main container */ .menu-container max-width: 1280px; margin: 2rem auto; padding: 2rem 1.5rem 3rem; background: #fffdf9; border-radius: 32px; box-shadow: 0 20px 35px -12px rgba(0, 0, 0, 0.08);