/* Algemene body */ body { font-family: Arial, sans-serif; margin: 0; display: flex; flex-direction: column; /* Change to column to accommodate the top bar */ background-color: #f2c14e; } /* Top bar menu */ .menu-bar { width: 100%; background-color: #f2c14e; padding: 10px 0; display: flex; justify-content: space-around; align-items: center; box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); position: fixed; /* Fix the top bar to the top */ top: 0; z-index: 1000; /* Ensure it is above other elements */ transition: background-color 0.3s ease; /* Add transition for background color */ } .menu-bar.dark { background-color: #d1a73e; /* Darker background color when modal is open */ } .menu-item { background-color: #fff; padding: 10px 20px; margin: 5px; border-radius: 8px; cursor: pointer; font-size: 1.2em; transition: all 0.3s ease; } .menu-item:hover { background-color: #f59e42; box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); } /* Productweergave in een grid */ .product-display { width: calc(100% - 20%); /* Adjust width to leave space for the cart */ display: flex; flex-wrap: wrap; padding: 20px; justify-content: space-around; margin-top: 60px; /* Add margin to ensure it starts below the top bar */ } .product-box { width: 200px; /* Keep the width fixed */ margin: 10px; border-radius: 8px; overflow: hidden; text-align: center; cursor: pointer; transition: all 0.3s ease; border: 2px solid darkgoldenrod; /* 2px dikke zwarte rand */ padding: 20px; /* Ruimte binnen de container */ } } .product-box:hover { transform: scale(1.05); } .product-box img { width: 100%; max-height: 150px; object-fit: cover; } /* Modaal venster */ .modal { display: none; position: fixed; z-index: 1; left: 0; top: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.5); overflow-y: auto; /* Allow scrolling for larger content */ } .modal-content { background-color: white; margin: 5% auto; padding: 20px; border-radius: 8px; width: 80%; max-width: 600px; text-align: center; max-height: 90vh; overflow-y: auto; } .modal img { width: 100%; max-width: 300px; height: auto; margin: 20px 0; } .close { position: absolute; top: 10px; right: 20px; font-size: 30px; font-weight: bold; cursor: pointer; } #add-to-cart { background-color: #4CAF50; color: white; border: none; padding: 10px 20px; cursor: pointer; border-radius: 5px; margin-top: 20px; } #add-to-cart:hover { background-color: #45a049; } /* Winkelwagen-icoon */ .cart-icon { position: fixed; top: 80px; /* Move the cart icon down */ right: 20px; background-color: #ff6600; color: white; padding: 10px 15px; border-radius: 50%; font-size: 20px; cursor: pointer; box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); } .cart-icon:hover { background-color: #e65c00; } .cart-count { position: absolute; top: -5px; right: -5px; background: red; color: white; font-size: 12px; font-weight: bold; padding: 3px 6px; border-radius: 50%; } /* Productstijl */ .products { display: flex; gap: 20px; margin: 50px; } .product { border: 1px solid #ddd; padding: 20px; text-align: center; } .product button { background-color: #ff6600; color: white; border: none; padding: 10px; cursor: pointer; margin-top: 10px; } .product button:hover { background-color: #e65c00; } /* Responsive design */ @media (max-width: 768px) { .menu-bar { flex-wrap: wrap; /* Allow wrapping of menu items */ } .product-display { width: 100%; /* Use full width for product display */ margin-top: 120px; /* Increase margin to accommodate wrapped menu bar */ } .cart { width: 100%; /* Use full width for cart */ top: auto; /* Remove fixed position */ bottom: 0; /* Position at the bottom */ height: auto; /* Adjust height */ } }