diff --git a/about.html b/about.html index cdb7529..96d0025 100644 --- a/about.html +++ b/about.html @@ -187,6 +187,15 @@

Contact Us

+
+ + Back to Top +
diff --git a/cart.html b/cart.html index 47fb467..da453e0 100644 --- a/cart.html +++ b/cart.html @@ -141,6 +141,14 @@

Your Cart

+ +
+ + Back to Top +
+ @@ -192,13 +200,13 @@

Your Cart

- + diff --git a/css/style.css b/css/style.css index 832a43c..ce1ec83 100644 --- a/css/style.css +++ b/css/style.css @@ -2458,7 +2458,7 @@ mark.highlight { border-radius: 5px; font-size: 12px; font-weight: bold; -======= + /* ===== Dark Mode Theme ===== */ .theme-toggle { position: relative; @@ -2852,11 +2852,10 @@ body.dark .cart-badge { } ::-webkit-scrollbar-thumb:hover { background: #e64a19; - newFeatures /*Accessibility Styles */ } /* ===== Accessibility Styles ===== */ -main + /* Skip link - visible on focus */ .skip-link { @@ -3026,7 +3025,7 @@ button:disabled { /* Hover effect for disabled button */ .add-btn:disabled:hover { transform: none !important; - opacity: 0.6; main + opacity: 0.6; } #voice-search-btn { border: none; @@ -3081,443 +3080,53 @@ button:disabled { background: #e64a19; transform: scale(1.05); } -.combo-item-right { - display: flex; - align-items: center; - gap: 10px; -} -} - -/* ===== Cinematic Video Hero ===== */ -.hero { - position: relative; - width: 100%; - min-height: calc(100vh - var(--header-height, 90px)); - height: calc(100vh - var(--header-height, 90px)); - padding: 0 8%; - display: flex; - align-items: center; - justify-content: flex-start; - gap: 0; - flex-wrap: nowrap; - overflow: hidden; - margin-bottom: 0; - background: #130a06; - text-align: left; -} - -.hero-video-stage, -.hero-bg-video, -.hero-overlay { - position: absolute; - inset: 0; -} - -.hero-video-stage { - z-index: 1; - background: #130a06; - overflow: hidden; -} - -.hero-video, -.hero-bg-video { - width: 100%; - height: 100%; - object-fit: cover; - opacity: 0; - transform: scale(1.04); - transition: opacity 1.25s ease, transform 7s ease; - will-change: opacity, transform; -} - -.hero-bg-video.active { - opacity: 1; - transform: scale(1); -} - -.hero-overlay { - z-index: 2; - background: linear-gradient( - 90deg, - rgba(0, 0, 0, 0.70) 0%, - rgba(0, 0, 0, 0.45) 45%, - rgba(0, 0, 0, 0.20) 100% - ); -} - -.hero-content { - position: relative; - z-index: 3; - flex: 0 0 min(650px, 52vw); - max-width: 650px; - height: 100%; - display: flex; - flex-direction: column; - justify-content: center; - align-items: flex-start; - margin: 0; - text-align: left; - color: #ffffff; -} - -.hero-badge, -.hero-secondary-btn, -.hero-stat-card { - background: rgba(255, 255, 255, 0.12); - border: 1px solid rgba(255, 255, 255, 0.22); - backdrop-filter: blur(18px); - -webkit-backdrop-filter: blur(18px); - box-shadow: 0 24px 60px rgba(0, 0, 0, 0.22); -} - -.hero-badge { - display: inline-flex; - align-items: center; - gap: 0.55rem; - width: fit-content; - margin-bottom: 1.4rem; - padding: 0.62rem 1rem; - border-radius: 999px; - color: rgba(255, 255, 255, 0.94); - font-size: 0.95rem; - font-weight: 700; - animation: heroFadeUp 0.75s ease both; -} - -.hero-title, -.hero-content h1 { - margin: 0 0 1.35rem; - color: #ffffff; - font-size: clamp(2.75rem, 4.4vw, 4.75rem); - font-weight: 800; - line-height: 1.05; - text-shadow: 0 8px 34px rgba(0, 0, 0, 0.52); - letter-spacing: 0; - animation: heroFadeUp 0.85s ease 0.08s both; -} - -.hero-content p { - max-width: 550px; - margin: 0; - color: rgba(255, 255, 255, 0.85); - font-size: 1.1rem; - font-weight: 500; - line-height: 1.8; - text-shadow: 0 4px 20px rgba(0, 0, 0, 0.4); - animation: heroFadeUp 0.85s ease 0.2s both; -} - -.hero-actions { - display: flex; - align-items: center; - justify-content: flex-start; - gap: 20px; - flex-wrap: wrap; - margin-top: 30px; - animation: heroFadeUp 0.85s ease 0.4s both; -} - -.hero-primary-btn, -.hero-secondary-btn { - min-width: 154px; - min-height: 54px; - display: inline-flex; - align-items: center; - justify-content: center; - border-radius: 999px; - padding: 0.95rem 1.65rem; - font-size: 1rem; - font-weight: 800; - line-height: 1; - transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease; -} - -.hero-primary-btn { - background: linear-gradient(135deg, #ff5a1f 0%, #ff7a1f 100%); - color: #ffffff; - box-shadow: 0 18px 42px rgba(255, 90, 31, 0.38); -} - -.hero-primary-btn:hover, -.hero-primary-btn:focus-visible { - background: linear-gradient(135deg, #ff7a1f 0%, #ff5a1f 100%); - transform: translate3d(0, -3px, 0); - box-shadow: 0 24px 52px rgba(255, 90, 31, 0.5); -} - -.hero-secondary-btn { - color: #ffffff; - border-color: rgba(255, 255, 255, 0.46); -} - -.hero-secondary-btn:hover, -.hero-secondary-btn:focus-visible { - transform: translate3d(0, -3px, 0); - border-color: rgba(255, 255, 255, 0.75); - box-shadow: 0 24px 50px rgba(0, 0, 0, 0.28); -} - -.hero-stats { - position: absolute; - z-index: 3; - top: 50%; - right: 8%; - width: 300px; - min-width: 0; - height: 370px; - transform: translateY(-50%); - pointer-events: none; -} - -.hero-stat-card { - position: absolute; - width: 230px; - min-width: 0; - display: flex; - align-items: center; - gap: 0.8rem; - padding: 0.95rem 1.05rem; - border-radius: 18px; - color: #ffffff; - animation: heroFloat 5.5s ease-in-out infinite; - will-change: transform; -} - -.hero-stat-card strong { - display: block; - color: #ffffff; - font-size: 1.1rem; - line-height: 1.1; -} - -.hero-stat-card span:last-child { - color: rgba(255, 255, 255, 0.78); - font-size: 0.9rem; - font-weight: 700; -} - -.hero-stat-icon { - width: 42px; - height: 42px; - display: inline-flex; - align-items: center; - justify-content: center; - flex: 0 0 42px; - border-radius: 50%; - background: rgba(255, 122, 31, 0.2); -} - -.hero-stat-rating { - top: 0; - right: 0; -} - -.hero-stat-delivery { - top: 130px; - right: 58px; - animation-delay: 0.8s; -} - -.hero-stat-orders { - top: 260px; - right: 0; - animation-delay: 1.6s; -} - -.hero-scroll-indicator { - position: absolute; - z-index: 3; - left: 50%; - bottom: 2rem; - width: 28px; - height: 46px; - display: inline-flex; - justify-content: center; - border: 1.5px solid rgba(255, 255, 255, 0.72); - border-radius: 999px; - transform: translateX(-50%); -} - -.hero-scroll-indicator span { - width: 5px; - height: 5px; - margin-top: 9px; - border-radius: 50%; - background: #ffffff; - animation: heroScrollDot 1.6s ease-in-out infinite; -} - -body.dark .hero { - background: #130a06; - color: #ffffff; -} - -body.dark .hero-content h1, -body.dark .hero-content p { - color: #ffffff; -} - -body.dark .hero-content p { - color: rgba(255, 255, 255, 0.85); -} - -.specials, -.menu, -.specials-section, -.menu-section { - position: relative; - z-index: 5; -} - -@keyframes heroFadeUp { - from { - opacity: 0; - transform: translate3d(0, 26px, 0); - } - - to { - opacity: 1; - transform: translate3d(0, 0, 0); - } -} - -@keyframes heroFloat { - 0%, - 100% { - transform: translate3d(0, 0, 0); - } - - 50% { - transform: translate3d(0, -14px, 0); - } -} - -@keyframes heroScrollDot { - 0% { - opacity: 0; - transform: translateY(0); - } - - 35% { - opacity: 1; - } - - 100% { - opacity: 0; - transform: translateY(20px); - } -} - -@media (max-width: 1024px) { - .hero { - padding: 0 6%; - } - - .hero-stats { - right: 4%; - opacity: 0.92; - } -} - -@media (max-width: 768px) { - .hero { - min-height: calc(100vh - var(--header-height, 90px)); - height: auto; - padding: 3.5rem 1.25rem 4.5rem; - align-items: center; - justify-content: center; - text-align: center; - flex-direction: column; - } - - .hero-overlay { - background: linear-gradient( - 180deg, - rgba(0, 0, 0, 0.62) 0%, - rgba(0, 0, 0, 0.46) 48%, - rgba(0, 0, 0, 0.66) 100% - ); - } - - .hero-content { - max-width: 100%; - height: auto; - margin: 0 auto; - } - - .hero-badge, - .hero-actions { - margin-left: auto; - margin-right: auto; - } - - .hero-title, - .hero-content h1 { - font-size: clamp(2.45rem, 11vw, 3.65rem); - line-height: 1.05; - } - - .hero-content p { - margin-left: auto; - margin-right: auto; - font-size: 1.02rem; - line-height: 1.7; - } - - .hero-actions { - flex-direction: column; - width: min(100%, 360px); - } - - .hero-primary-btn, - .hero-secondary-btn { - width: 100%; - } - - .hero-stats { - position: relative; - top: auto; - right: auto; - width: min(100%, 360px); - min-width: 0; - margin: 2.2rem auto 0; - transform: none; - display: grid; - gap: 0.7rem; - } - - .hero-stat-card { - position: static; - min-width: 0; - width: 100%; - justify-content: flex-start; - border-radius: 16px; - animation-duration: 4.8s; - } -} - -@media (max-width: 480px) { - .hero { - padding-left: 1rem; - padding-right: 1rem; - } - - .hero-badge { - font-size: 0.82rem; - padding: 0.55rem 0.82rem; - } -} - -@media (prefers-reduced-motion: reduce) { - .hero-bg-video, - .hero-badge, - .hero-content h1, - .hero-content p, - .hero-actions, - .hero-stat-card, - .hero-scroll-indicator span { - animation: none !important; - transition: none !important; - } -} +.combo-item-right { + display: flex; + align-items: center; + gap: 10px; +} +} + +.back-to-top-container { + position: fixed; + bottom: 20px; + right: 20px; + z-index: 9999; + + display: none; + flex-direction: column; + align-items: center; +} + +#backToTop { + width: 70px; + height: 70px; + border: none; + border-radius: 50%; + cursor: pointer; + background: white; + box-shadow: 0 4px 15px rgba(0,0,0,0.2); + + display: flex; + align-items: center; + justify-content: center; + + transition: 0.3s ease; +} + +#backToTop:hover { + transform: translateY(-5px); +} +#backToTop img { + width: 70px; + height: 70px; + object-fit: contain; +} + +.back-to-top-text { + margin-top: 5px; + font-size: 12px; + font-weight: 600; + color: #ff6b35; +} \ No newline at end of file diff --git a/favorites.html b/favorites.html index 1da4b9a..0e927d0 100644 --- a/favorites.html +++ b/favorites.html @@ -133,6 +133,17 @@

Contact Us

© 2026 ChaatBazar. All rights reserved.

+ +
+ + Back to Top +
+ diff --git a/img/golgappa.png b/img/golgappa.png new file mode 100644 index 0000000..4009cd4 Binary files /dev/null and b/img/golgappa.png differ diff --git a/index.html b/index.html index 08cc12c..c8d5bb3 100644 --- a/index.html +++ b/index.html @@ -937,6 +937,15 @@

class="toast-notification" > + +
+ + Back to Top +
+ + diff --git a/js/main.js b/js/main.js index 0db96c1..bc1bb87 100644 --- a/js/main.js +++ b/js/main.js @@ -20,10 +20,12 @@ function setupCartManager() { cartManager.subscribe((items) => { cart = [...items]; }); - - // Validate cart integrity - cartManager.validate(); + if (typeof cartManager.validate === "function") { + cartManager.validate(); + } } + + async function loadMenuData() { try { @@ -415,7 +417,7 @@ function renderRecentlyViewed() { recentItems.forEach(item => recentlyViewedContainer.appendChild(createCard(item))); } - newFeatures + // Unified Interactive Filter Engine ===== function renderFavorites() { const favoritesContainer = document.getElementById("favorites-container"); @@ -824,7 +826,7 @@ function renderOrdersList() { `; container.appendChild(card); - }); + });q } // ===== Global Window Handlers ===== @@ -952,7 +954,7 @@ window.reorderOrder = function (orderId) { sidebar.classList.add("open"); } }; - newFeatures + // Cart Operations @@ -962,7 +964,7 @@ window.reorderOrder = function (orderId) { // ===== Toast Notification ===== -main + function showToast(message) { const toast = document.getElementById("toast-notification"); if (!toast) return; @@ -1017,7 +1019,7 @@ function removeFromCart(id) { if (!cartItem) return; - const removedItem = cartItem.item; + // const removedItem = cartItem.item; if ( typeof cartManager.decreaseQuantity === @@ -1236,9 +1238,8 @@ function setupSearchSuggestions() { if (!searchInput.contains(e.target) && !suggestionsContainer.contains(e.target)) { suggestionsContainer.style.display = "none"; } - ); + }); } - function setupSearch() { const searchInput = document.getElementById("search-input"); const searchBtn = document.getElementById("search-btn"); @@ -1536,67 +1537,7 @@ async function init() { window.location.href = `orders.html?delivery=${result.deliveryAvailable}`; } }); - ); - - recognition.onresult = ( - event - ) => { - const transcript = - event.results[0][0].transcript; - - searchInput.value = transcript; - - applyAllFilters(); - - voiceBtn.innerHTML = "🎤"; - - // Bind interactive UI listeners immediately for instant input responsiveness (high INP) - setupCartToggle(); - setupFilterButtons(); - setupCouponListeners(); - setupOrderNowScroll(); - setupSearchSuggestions(); - setupSearch(); - setupAdvancedFilters(); - setupContactForm(); - setupNewsletterForm(); - setupActiveNavbar(); - setupDropdownFilterLinks(); - - if (checkoutBtn) { - checkoutBtn.addEventListener("click", (e) => { - e.preventDefault(); - if (cart.length === 0) { - alert("Your cart is empty!"); - return; - } - window.location.href = "orders.html"; - }); - } - voiceBtn.classList.remove( - "listening" - ); - }; - - recognition.onerror = () => { - voiceBtn.innerHTML = "🎤"; - - voiceBtn.classList.remove( - "listening" - ); - - alert( - "Voice recognition failed." - ); - }; - - recognition.onend = () => { - voiceBtn.innerHTML = "🎤"; - - voiceBtn.classList.remove( - "listening" - ); - }; + } // Load menu data, then render @@ -1616,6 +1557,7 @@ async function init() { renderOrdersList(); updateOrderStatuses(); setInterval(updateOrderStatuses, 3000); + initBackToTopButton(); } if (document.readyState === "loading") { @@ -1686,4 +1628,22 @@ if (toggleBtn) { localStorage.setItem("theme", document.body.classList.contains("dark") ? "dark" : "light"); }); } - + +function initBackToTopButton() { + const backToTopBtn = document.querySelector("#backToTop"); + const backToTopContainer = document.querySelector(".back-to-top-container"); + + if (backToTopBtn && backToTopContainer) { + window.addEventListener("scroll", () => { + backToTopContainer.style.display = + window.scrollY > 200 ? "flex" : "none"; + }); + + backToTopBtn.addEventListener("click", () => { + window.scrollTo({ + top: 0, + behavior: "smooth" + }); + }); + } +} \ No newline at end of file diff --git a/menu.html b/menu.html index 94d9f3d..5b50e1d 100644 --- a/menu.html +++ b/menu.html @@ -208,6 +208,15 @@

Contact Us

+
+ + Back to Top +
diff --git a/orders.html b/orders.html index 932d146..073052b 100644 --- a/orders.html +++ b/orders.html @@ -399,6 +399,16 @@

Have a promo cod
+ +
+ + Back to Top +
diff --git a/recommendations.html b/recommendations.html index 2a0b0dd..eb0cf39 100644 --- a/recommendations.html +++ b/recommendations.html @@ -333,6 +333,17 @@

+ +
+ + Back to Top +
+ @@ -484,5 +495,23 @@

${food}

// wait for DOM + cart system window.addEventListener("load", renderComboCards); + +//back-to-top-button +const backToTopContainer = document.querySelector(".back-to-top-container"); +const backToTopBtn = document.getElementById("backToTop"); + +window.addEventListener("scroll", () => { + if (backToTopContainer) { + backToTopContainer.style.display = + window.scrollY > 50 ? "flex" : "none"; + } +}); + +backToTopBtn?.addEventListener("click", () => { + window.scrollTo({ + top: 0, + behavior: "smooth" + }); +});