Skip to content
https://www.dhiveennatural.in

Lighthouse Mobile

· 0 checks — Mobile Lighthouse audit -- Performance, Accessibility, Best Practices, and SEO category breakdown.
SCORE
0
GRADE
FIX
0
REVIEW
0
PASS
0
INFO
0

Detailed Report

Audit breakdown by category with detailed findings.

45

Performance

Insights

Remove large, duplicate JavaScript modules from bundles to reduce unnecessary bytes consumed by network activity.

Why this matters

Performance issues directly impact user engagement and conversion rates.

Polyfills and transforms enable older browsers to use new JavaScript features. However, many aren't necessary for modern browsers. Consider modifying your JavaScript build process to not transpile Baseline features, unless you know you must support older browsers. Learn why most sites can deploy ES6+ code without transpiling

Why this matters

Performance issues directly impact user engagement and conversion rates.

3rd party code can significantly impact load performance. Reduce and defer loading of 3rd party code to prioritize your page's content.

Why this matters

Performance issues directly impact user engagement and conversion rates.

Layout shifts occur when elements move absent any user interaction. Investigate the causes of layout shifts, such as elements being added, removed, or their fonts changing as the page loads.

Why this matters

Performance issues directly impact user engagement and conversion rates.

headings: [map[key:node label:Element subItemsHeading:map[key:extra] valueType:node] map[granularity:0.001 key:score label:Layout shift score subItemsHeading:map[key:cause valueType:text] valueType:numeric]]
items: [map[node:map[type:text value:Total] score:0.4903864098389495] map[node:map[boundingRect:map[bottom:7535 height:7078 left:0 right:412 top:457 width:412] lhId:page-21-MAIN nodeLabel:Our Products HOMEMADE SOAP DHIVEEN NATURAL Avarampoo Soap Avarampoo Handmade So… path:1,HTML,1,BODY,4,MAIN selector:body > main.products-wrap snippet:<main class="products-wrap"> type:node] score:0.4896719319562576] map[node:map[boundingRect:map[bottom:67 height:59 left:291 right:392 top:8 width:101] lhId:page-18-BUTTON nodeLabel:🛒 Cart 0 path:1,HTML,1,BODY,0,HEADER,0,DIV,3,BUTTON selector:body > header.header > div.header-inner > button.cart-button snippet:<button class="cart-button" onclick="openCart()"> type:node] score:0.0007144778826919048]]

Your first network request is the most important. Reduce its latency by avoiding redirects, ensuring a fast server response, and enabling text compression.

Why this matters

Performance issues directly impact user engagement and conversion rates.

Reducing the download time of images can improve the perceived load time of the page and LCP. Learn more about optimizing image size

Why this matters

Performance issues directly impact user engagement and conversion rates.

URLResource SizeEst Savings
DHIVEEN NATURAL Banner section#normalHeroWrap > div#hero > picture > img#heroImage
/Hero banner/Mobile Hero Banner/ChatGPT Image Sep 25, 202...2.3 MiB2.3 MiB
THOORIGA Detergent Liquid main.products-wrap > div#productGrid > article.product-card > img.product-image
/PRODUCTS/HOUSEHOLD LIQUID/DTERGENT LIQUD/1.png2.1 MiB2.1 MiB
DHIVEEN NATURAL Kuppaimeni Soap main.products-wrap > div#productGrid > article.product-card > img.product-image
/PRODUCTS/SOAP/KUPPAIMENI/KUPPAIMENI 1.png2.0 MiB1.9 MiB
DHIVEEN NATURAL Shikakai Shampoo main.products-wrap > div#productGrid > article.product-card > img.product-image
pub-f9f13e3b335f45acbe929a378e7bacb9.r2.dev/PRODUCTS/SHAMPOO/SHIKAKAI/1.png1.9 MiB1.9 MiB
Hair Brush, Comb & Mirror Set with Stand main.products-wrap > div#productGrid > article.product-card > img.product-image
/PRODUCTS/PERSONAL CARE/HAIR COMOB/1.png1.9 MiB1.9 MiB
DHIVEEN NATURAL Avarampoo Soap main.products-wrap > div#productGrid > article.product-card > img.product-image
/PRODUCTS/SOAP/AVARAMPOO/AVARAMPOO 1ST.png1.9 MiB1.9 MiB
DHIVEEN NATURAL Goat Milk Soap main.products-wrap > div#productGrid > article.product-card > img.product-image
/PRODUCTS/SOAP/GOAT MILK/GOAT MILK 1.png1.8 MiB1.8 MiB
THOORIGA Freshnol Perfumed Phenyl main.products-wrap > div#productGrid > article.product-card > img.product-image
/PRODUCTS/HOUSEHOLD LIQUID/PHYNEL/1.png1.8 MiB1.8 MiB
DHIVEEN NATURAL Charcoal Soap main.products-wrap > div#productGrid > article.product-card > img.product-image
/PRODUCTS/SOAP/CHARCOAL/CHARCOAL 1ST.png1.8 MiB1.8 MiB
DHIVEEN NATURAL Rose Petal Soap main.products-wrap > div#productGrid > article.product-card > img.product-image
pub-f9f13e3b335f45acbe929a378e7bacb9.r2.dev/PRODUCTS/SOAP/ROSE/ROSE%201.png1.8 MiB1.8 MiB
DHIVEEN NATURAL Kasturi Manjal Soap main.products-wrap > div#productGrid > article.product-card > img.product-image
/PRODUCTS/SOAP/Kasturi Manjal Soap/0.png1.7 MiB1.7 MiB
DHIVEEN NATURAL Kumkumadi Soap main.products-wrap > div#productGrid > article.product-card > img.product-image
/PRODUCTS/SOAP/KUMKUMADI/KUMKUMADI 1.png1.7 MiB1.7 MiB
Real Techniques Face Essentials 5-Piece Makeup Brush Set main.products-wrap > div#productGrid > article.product-card > img.product-image
/PRODUCTS/PERSONAL CARE/REAL TECH/1.png1.7 MiB1.7 MiB
THOORIGA Dishwash Liquid main.products-wrap > div#productGrid > article.product-card > img.product-image
/PRODUCTS/HOUSEHOLD LIQUID/DISWASH LIQUD/1.png1.7 MiB1.7 MiB
THOORIGA Fabric Softener main.products-wrap > div#productGrid > article.product-card > img.product-image
/PRODUCTS/HOUSEHOLD LIQUID/FABRIC SOFTNER/1.png1.7 MiB1.6 MiB
DHIVEEN NATURAL Small Onion Hair Oil main.products-wrap > div#productGrid > article.product-card > img.product-image
pub-f9f13e3b335f45acbe929a378e7bacb9.r2.dev/PRODUCTS/HAIR%20OIL/HAIR%20OIL/1.png1.6 MiB1.6 MiB
DHIVEEN NATURAL body > header.header > div.header-inner > img.logo
/DHIVEEN NATURAL LOGO/ChatGPT Image Sep 16, 2026, 10_55_5...1.6 MiB1.6 MiB
Dhiveen Natural Makeup Brush Set main.products-wrap > div#productGrid > article.product-card > img.product-image
/PRODUCTS/PERSONAL CARE/MAKEUP KIT/1.png379.4 KiB361.4 KiB

Optimize LCP by making the LCP image discoverable from the HTML immediately, and avoiding lazy-loading

Why this matters

Performance issues directly impact user engagement and conversion rates.

lhId: page-0-IMG
nodeLabel: DHIVEEN NATURAL Banner
path: 1,HTML,1,BODY,1,SECTION,0,DIV,0,PICTURE,1,IMG
selector: section#normalHeroWrap > div#hero > picture > img#heroImage
snippet: <img id="heroImage" src="https://pub-f9f13e3b335f45acbe929a378e7bacb9.r2.dev/Hero%20banner/Mobile%2…" alt="DHIVEEN NATURAL Banner" fetchpriority="high" decoding="async" class="">

Avoid chaining critical requests by reducing the length of chains, reducing the download size of resources, or deferring the download of unnecessary resources to improve page load.

Why this matters

Performance issues directly impact user engagement and conversion rates.

description: [preconnect](https://developer.chrome.com/docs/lighthouse/performance/uses-rel-preconnect/) hints help the browser establish a connection earlier in the page load, saving time when the first request for that origin is made. The following are the origins that the page preconnected to.
title: Preconnected origins
value: no origins were preconnected
description: Add [preconnect](https://developer.chrome.com/docs/lighthouse/performance/uses-rel-preconnect/) hints to your most important origins, but try to use no more than 4.
title: Preconnect candidates

Requests are blocking the page's initial render, which may delay LCP. Deferring or inlining can move these network requests out of the critical path.

Why this matters

Performance issues directly impact user engagement and conversion rates.

URLTransfer SizeDuration
sdk.cashfree.com/js/v3/cashfree.js17.7 KiB905 ms

These insights are also available in the Chrome DevTools Performance Panel - record a trace to view more detailed information.

Redirects introduce additional delays before the page can be loaded. Learn how to avoid page redirects.

Why this matters

Performance issues directly impact user engagement and conversion rates.

Estimated savings: 805 ms

These are the largest layout shifts observed on the page. Each table item represents a single layout shift, and shows the element that shifted the most. Below each item are possible root causes that led to the layout shift. Some of these layout shifts may not be included in the CLS metric value due to windowing. Learn how to improve CLS

Why this matters

Performance issues directly impact user engagement and conversion rates.

ElementLayout shift score
Our Products HOMEMADE SOAP DHIVEEN NATURAL Avarampoo Soap Avarampoo Handmade So… body > main.products-wrap
0.490
🛒 Cart 0 body > header.header > div.header-inner > button.cart-button
0.001

Time to Interactive is the amount of time it takes for the page to become fully interactive. Learn more about the Time to Interactive metric.

Why this matters

Performance issues directly impact user engagement and conversion rates.

TTI

The maximum potential First Input Delay that your users could experience is the duration of the longest task. Learn more about the Maximum Potential First Input Delay metric.

Why this matters

Performance issues directly impact user engagement and conversion rates.

Diagnostics

Reduce unused JavaScript and defer loading scripts until they are required to decrease bytes consumed by network activity. Learn how to reduce unused JavaScript.

Why this matters

Performance issues directly impact user engagement and conversion rates.

Estimated savings: 500 ms 72.5 KiB
URLTransfer SizeEst Savings
www.googletagmanager.com/gtag/js?id=G-KH6Y21VXGZ176.1 KiB72.5 KiB

Consider reducing the time spent parsing, compiling and executing JS. You may find delivering smaller JS payloads helps with this. Learn how to minimize main-thread work

Why this matters

Performance issues directly impact user engagement and conversion rates.

CategoryTime Spent
Other1.4 s
Script Evaluation393 ms
Rendering205 ms
Style & Layout188 ms
Script Parsing & Compilation66 ms
Parse HTML & CSS24 ms

Many navigations are performed by going back to a previous page, or forwards again. The back/forward cache (bfcache) can speed up these return navigations. Learn more about the bfcache

Why this matters

Performance issues directly impact user engagement and conversion rates.

Failure reasonFailure type
Pages with cache-control:no-store header cannot enter back/forward cache.Actionable
Pages whose main resource has cache-control:no-store cannot enter back/forward cache.Not actionable
Back/forward cache is disabled because some JavaScript network request received resource with Cache-Control: no-store header.Not actionable

Minifying JavaScript files can reduce payload sizes and script parse time. Learn how to minify JavaScript.

Why this matters

Performance issues directly impact user engagement and conversion rates.

Estimated savings: 0.0 ms 4.3 KiB
URLTransfer SizeEst Savings
inline: let products = []; let heroes = []; …16.6 KiB4.3 KiB

More information about the performance of your application. These numbers don't directly affect the Performance score.

●Optimize DOM size
●Font display
●Forced reflow
●LCP breakdown
●Optimize viewport for mobile
●Minify CSS
●Reduce unused CSS
●JavaScript execution time 0.4 s
●Avoid long main-thread tasks 4 long tasks found
●Image elements have explicit `width` and `height`
●Network Requests
●Network Round Trip Times 30 ms
●Server Backend Latencies 500 ms
●Tasks
●Diagnostics
●Metrics
●Screenshot Thumbnails
●Final Screenshot
●Script Treemap Data
●Resources Summary
●Initial server response time was short Root document took 30 ms
○INP breakdown
○User Timing marks and measures
○Avoid non-composited animations
100

Accessibility

These checks highlight opportunities to improve the accessibility of your web app. Automatic detection can only detect a subset of issues and does not guarantee the accessibility of your web app, so manual testing is also encouraged.

○Interactive controls are keyboard focusable
○Interactive elements indicate their purpose and state
○The page has a logical tab order
○Visual order on the page follows DOM order
○User focus is not accidentally trapped in a region
○The user's focus is directed to new content added to the page
○HTML5 landmark elements are used to improve navigation
○Offscreen content is hidden from assistive technology
○Custom controls have associated labels
○Custom controls have ARIA roles
●`[aria-hidden="true"]` is not present on the document `<body>`
●Buttons have an accessible name
●Image elements have `[alt]` attributes
●Form elements have associated labels
●`[user-scalable="no"]` is not used in the `<meta name="viewport">` element and the `[maximum-scale]` attribute is not less than 5.
●Background and foreground colors have a sufficient contrast ratio
●Document has a `<title>` element
●`<html>` element has a `[lang]` attribute
●`<html>` element has a valid value for its `[lang]` attribute
●Links have a discernible name
●Touch targets have sufficient size and spacing.
●Heading elements appear in a sequentially-descending order
●Document has a main landmark.
○`[accesskey]` values are unique
○`[aria-*]` attributes match their roles
○`button`, `link`, and `menuitem` elements have accessible names
○ARIA attributes are used as specified for the element's role
○Deprecated ARIA roles were not used
○Elements with `role="dialog"` or `role="alertdialog"` have accessible names.
○`[aria-hidden="true"]` elements do not contain focusable descendents
○ARIA input fields have accessible names
○ARIA `meter` elements have accessible names
○ARIA `progressbar` elements have accessible names
○Elements use only permitted ARIA attributes
○`[role]`s have all required `[aria-*]` attributes
○Elements with an ARIA `[role]` that require children to contain a specific `[role]` have all required children.
○`[role]`s are contained by their required parent element
○`[role]` values are valid
○Elements with the `role=text` attribute do not have focusable descendents.
○ARIA toggle fields have accessible names
○ARIA `tooltip` elements have accessible names
○ARIA `treeitem` elements have accessible names
○`[aria-*]` attributes have valid values
○`[aria-*]` attributes are valid and not misspelled
○The page contains a heading, skip link, or landmark region
○`<dl>`'s contain only properly-ordered `<dt>` and `<dd>` groups, `<script>`, `<template>` or `<div>` elements.
○Definition list items are wrapped in `<dl>` elements
○ARIA IDs are unique
○No form fields have multiple labels
○`<frame>` or `<iframe>` elements have a title
○`<html>` element has an `[xml:lang]` attribute with the same base language as the `[lang]` attribute.
○Input buttons have discernible text.
○`<input type="image">` elements have `[alt]` text
○Links are distinguishable without relying on color.
○Lists contain only `<li>` elements and script supporting elements (`<script>` and `<template>`).
○List items (`<li>`) are contained within `<ul>`, `<ol>` or `<menu>` parent elements
○The document does not use `<meta http-equiv="refresh">`
○`<object>` elements have alternate text
○Select elements have associated label elements.
○Skip links are focusable.
○No element has a `[tabindex]` value greater than 0
○Cells in a `<table>` element that use the `[headers]` attribute refer to table cells within the same table.
○`<th>` elements and elements with `[role="columnheader"/"rowheader"]` have data cells they describe.
○`[lang]` attributes have a valid value
○`<video>` elements contain a `<track>` element with `[kind="captions"]`
○Tables have different content in the summary attribute and `<caption>`.
○All heading elements contain content.
○Uses ARIA roles only on compatible elements
○Image elements do not have `[alt]` attributes that are redundant text.
○Identical links have the same purpose.
○Elements with visible text labels have matching accessible names.
○Tables use `<caption>` instead of cells with the `[colspan]` attribute to indicate a caption.
○`<td>` elements in a large `<table>` have one or more table headers.
100

Best Practices

●Uses HTTPS
●Avoids deprecated APIs
●Avoids third-party cookies
●Allows users to paste into input fields
●Avoids requesting the geolocation permission on page load
●Avoids requesting the notification permission on page load
●Displays images with correct aspect ratio
●Serves images with appropriate resolution
●Page has the HTML doctype
●Properly defines charset
●No browser errors logged to the console
●No issues in the `Issues` panel in Chrome Devtools
●Ensure CSP is effective against XSS attacks
●Use a strong HSTS policy
●Ensure proper origin isolation with COOP
●Mitigate clickjacking with XFO or CSP
●Mitigate DOM-based XSS with Trusted Types
●Page has valid source maps
○Redirects HTTP traffic to HTTPS
○Detected JavaScript libraries
92

SEO

These checks ensure that your page is following basic search engine optimization advice. There are many additional factors Lighthouse does not score here that may affect your search ranking, including performance on Core Web Vitals. Learn more about Google Search Essentials.

Crawling and Indexing

If your robots.txt file is malformed, crawlers may not be able to understand how you want your website to be crawled or indexed. Learn more about robots.txt.

Why this matters

Performance issues directly impact user engagement and conversion rates.

Line #ContentError
1<!DOCTYPE html>Syntax not understood
3<html lang="en">Syntax not understood
5<head>Syntax not understood
7<meta charset="UTF-8">Syntax not understood
9<!-- Google tag (gtag.js) -->Syntax not understood
10<script async src="https://www.googletagmanager.com/gtag/js?id=G-KH6Y21VXGZ"></script>Unknown directive
11<script>Syntax not understood
12 window.dataLayer = window.dataLayer || [];Syntax not understood
13 function gtag(){dataLayer.push(arguments);}Syntax not understood
14 gtag('js', new Date());Syntax not understood
16 gtag('config', 'G-KH6Y21VXGZ');Syntax not understood
17</script>Syntax not understood
19<metaSyntax not understood
20 name="viewport"Syntax not understood
21 content="width=device-width, initial-scale=1.0"Syntax not understood
22>Syntax not understood
24<metaSyntax not understood
25 name="description"Syntax not understood
26 content="DHIVEEN NATURAL - Natural Handmade Soaps, Hair Care and Home Care Products"Syntax not understood
27>Syntax not understood
29<title>DHIVEEN NATURAL</title>Syntax not understood
31<style>Syntax not understood
33* {Syntax not understood
34 box-sizing: border-box;Unknown directive
35 margin: 0;Unknown directive
36 padding: 0;Unknown directive
37}Syntax not understood
39body {Syntax not understood
40 font-family:Unknown directive
41 Arial,Syntax not understood
42 Helvetica,Syntax not understood
43 sans-serif;Syntax not understood
45 background:Unknown directive
46 linear-gradient(Syntax not understood
47 180deg,Syntax not understood
51 );Syntax not understood
53 color: #f1d77a;Unknown directive
55 min-height: 100vh;Unknown directive
56}Syntax not understood
58button,Syntax not understood
59input {Syntax not understood
60 font-family: inherit;Unknown directive
61}Syntax not understood
63button {Syntax not understood
64 cursor: pointer;Unknown directive
65}Syntax not understood
67img {Syntax not understood
68 max-width: 100%;Unknown directive
69}Syntax not understood
72/* HEADER */Syntax not understood
74.header {Syntax not understood
75 position: sticky;Unknown directive
77 top: 0;Unknown directive
79 z-index: 1000;Unknown directive
81 background:Unknown directive
82 rgba(4, 25, 19, 0.97);Syntax not understood
84 border-bottom:Unknown directive
85 1px solidSyntax not understood
86 rgba(215, 177, 70, 0.25);Syntax not understood
88 backdrop-filter: blur(12px);Unknown directive
89}Syntax not understood
91.header-inner {Syntax not understood
92 max-width: 1250px;Unknown directive
94 margin: auto;Unknown directive
96 min-height: 82px;Unknown directive
98 padding:Unknown directive
99 8px 20px;Syntax not understood
101 display: flex;Unknown directive
103 align-items: center;Unknown directive
105 justify-content: space-between;Unknown directive
107 gap: 20px;Unknown directive
108}Syntax not understood
111/* ONLY LOGO FIX */Syntax not understood
113.logo {Syntax not understood
114 width: 64px;Unknown directive
116 height: 64px;Unknown directive
118 object-fit: contain;Unknown directive
120 border-radius: 50%;Unknown directive
122 display: block;Unknown directive
123}Syntax not understood
126.cart-button {Syntax not understood
127 border:Unknown directive
128 1px solid #d7b146;Syntax not understood
130 background: #09291f;Unknown directive
132 color: #f1d77a;Unknown directive
134 padding:Unknown directive
135 11px 18px;Syntax not understood
137 border-radius: 30px;Unknown directive
139 font-size: 15px;Unknown directive
141 font-weight: 700;Unknown directive
143 display: flex;Unknown directive
145 align-items: center;Unknown directive
147 gap: 8px;Unknown directive
149 transition: 0.2s;Unknown directive
150}Syntax not understood
152.cart-button:hover {Unknown directive
153 background: #d7b146;Unknown directive
155 color: #062017;Unknown directive
156}Syntax not understood
158.cart-count {Syntax not understood
159 min-width: 23px;Unknown directive
161 height: 23px;Unknown directive
163 display: inline-flex;Unknown directive
165 align-items: center;Unknown directive
167 justify-content: center;Unknown directive
169 border-radius: 50%;Unknown directive
171 background: #d7b146;Unknown directive
173 color: #062017;Unknown directive
175 font-size: 12px;Unknown directive
176}Syntax not understood
179/* HERO */Syntax not understood
181.hero-wrap {Syntax not understood
182 max-width: 1250px;Unknown directive
184 margin:Unknown directive
185 22px auto 0;Syntax not understood
187 padding:Unknown directive
188 0 20px;Syntax not understood
189}Syntax not understood
191.hero {Syntax not understood
192 position: relative;Unknown directive
194 width: 100%;Unknown directive
196 aspect-ratio: 1250 / 340;Unknown directive
198 overflow: hidden;Unknown directive
200 border-radius: 28px;Unknown directive
202 background: #0b3024;Unknown directive
204 box-shadow:Unknown directive
205 0 15px 45pxSyntax not understood
206 rgba(0,0,0,0.35);Syntax not understood
207}Syntax not understood
209.hero picture {Syntax not understood
210 display: block;Unknown directive
211 width: 100%;Unknown directive
212 height: 100%;Unknown directive
213}Syntax not understood
215.hero img {Syntax not understood
216 width: 100%;Unknown directive
218 height: 100%;Unknown directive
220 object-fit: cover;Unknown directive
222 display: block;Unknown directive
224 opacity: 1;Unknown directive
226 transition:Unknown directive
227 opacity 0.45s ease;Syntax not understood
228}Syntax not understood
230.hero img.fade {Syntax not understood
231 opacity: 0;Unknown directive
232}Syntax not understood
234.hero-empty {Syntax not understood
235 width: 100%;Unknown directive
237 height: 100%;Unknown directive
239 display: flex;Unknown directive
241 align-items: center;Unknown directive
243 justify-content: center;Unknown directive
245 color: #bda95e;Unknown directive
246}Syntax not understood
249/* SEARCH */Syntax not understood
251.search-wrap {Syntax not understood
252 max-width: 1250px;Unknown directive
254 margin:Unknown directive
255 25px auto 0;Syntax not understood
257 padding:Unknown directive
258 0 20px;Syntax not understood
259}Syntax not understood
261.search-box {Syntax not understood
262 width: 100%;Unknown directive
264 padding:Unknown directive
265 15px 20px;Syntax not understood
267 border-radius: 16px;Unknown directive
269 border:Unknown directive
270 1px solidSyntax not understood
271 rgba(215, 177, 70, 0.45);Syntax not understood
273 background: #08251c;Unknown directive
275 color: #f5dd89;Unknown directive
277 outline: none;Unknown directive
279 font-size: 15px;Unknown directive
280}Syntax not understood
282.search-box::placeholder {Unknown directive
283 color: #9d946f;Unknown directive
284}Syntax not understood
286.search-box:focus {Unknown directive
287 border-color: #d7b146;Unknown directive
288}Syntax not understood
291/* CATEGORIES */Syntax not understood
293.category-wrap {Syntax not understood
294 max-width: 1250px;Unknown directive
296 margin:Unknown directive
297 18px auto 0;Syntax not understood
299 padding:Unknown directive
300 0 20px;Syntax not understood
302 display: flex;Unknown directive
304 gap: 10px;Unknown directive
306 overflow-x: auto;Unknown directive
307}Syntax not understood
309.category-wrap::-webkit-scrollbar {Unknown directive
310 display: none;Unknown directive
311}Syntax not understood
313.category-btn {Syntax not understood
314 white-space: nowrap;Unknown directive
316 padding:Unknown directive
317 10px 17px;Syntax not understood
319 border-radius: 25px;Unknown directive
321 border:Unknown directive
322 1px solidSyntax not understood
323 rgba(215, 177, 70, 0.45);Syntax not understood
325 background: #09291f;Unknown directive
327 color: #d9c36d;Unknown directive
329 font-weight: 700;Unknown directive
330}Syntax not understood
332.category-btn.active,Syntax not understood
333.category-btn:hover {Unknown directive
334 background: #d7b146;Unknown directive
336 color: #062017;Unknown directive
337}Syntax not understood
340/* PRODUCTS */Syntax not understood
342.products-wrap {Syntax not understood
343 max-width: 1250px;Unknown directive
345 margin:Unknown directive
346 28px auto 60px;Syntax not understood
348 padding:Unknown directive
349 0 20px;Syntax not understood
350}Syntax not understood
352.section-title {Syntax not understood
353 font-size: 23px;Unknown directive
355 margin-bottom: 18px;Unknown directive
357 color: #f1d77a;Unknown directive
358}Syntax not understood
360.product-grid {Syntax not understood
361 display: grid;Unknown directive
363 grid-template-columns:Unknown directive
364 repeat(4, minmax(0, 1fr));Syntax not understood
366 gap: 20px;Unknown directive
367}Syntax not understood
369.product-card {Syntax not understood
370 background:Unknown directive
371 linear-gradient(Syntax not understood
372 180deg,Syntax not understood
375 );Syntax not understood
377 border:Unknown directive
378 1px solidSyntax not understood
379 rgba(215, 177, 70, 0.24);Syntax not understood
381 border-radius: 20px;Unknown directive
383 overflow: hidden;Unknown directive
385 cursor: pointer;Unknown directive
387 transition:Unknown directive
388 transform 0.2s ease,Syntax not understood
389 box-shadow 0.2s ease;Syntax not understood
391 box-shadow:Unknown directive
392 0 10px 30pxSyntax not understood
393 rgba(0,0,0,0.18);Syntax not understood
394}Syntax not understood
396.product-card:hover {Unknown directive
397 transform: translateY(-4px);Unknown directive
399 box-shadow:Unknown directive
400 0 15px 35pxSyntax not understood
401 rgba(0,0,0,0.32);Syntax not understood
402}Syntax not understood
404.product-image {Syntax not understood
405 width: 100%;Unknown directive
407 height: 245px;Unknown directive
409 object-fit: cover;Unknown directive
411 background: white;Unknown directive
413 display: block;Unknown directive
414}Syntax not understood
416.product-content {Syntax not understood
417 padding: 15px;Unknown directive
418}Syntax not understood
420.product-category {Syntax not understood
421 color: #aaa16f;Unknown directive
423 font-size: 11px;Unknown directive
425 text-transform: uppercase;Unknown directive
427 letter-spacing: 1px;Unknown directive
429 margin-bottom: 7px;Unknown directive
430}Syntax not understood
432.product-name {Syntax not understood
433 color: #f1d77a;Unknown directive
435 font-size: 17px;Unknown directive
437 font-weight: 700;Unknown directive
439 margin-bottom: 8px;Unknown directive
440}Syntax not understood
442.product-short {Syntax not understood
443 color: #c5c3aa;Unknown directive
445 font-size: 13px;Unknown directive
447 line-height: 1.5;Unknown directive
449 min-height: 39px;Unknown directive
450}Syntax not understood
452.price-row {Syntax not understood
453 margin-top: 13px;Unknown directive
455 display: flex;Unknown directive
457 align-items: center;Unknown directive
459 gap: 9px;Unknown directive
460}Syntax not understood
462.price {Syntax not understood
463 font-size: 19px;Unknown directive
465 font-weight: 800;Unknown directive
467 color: #f4d66e;Unknown directive
468}Syntax not understood
470.mrp {Syntax not understood
471 color: #888875;Unknown directive
473 font-size: 13px;Unknown directive
475 text-decoration: line-through;Unknown directive
476}Syntax not understood
478.add-button {Syntax not understood
479 width: 100%;Unknown directive
481 margin-top: 13px;Unknown directive
483 padding:Unknown directive
484 11px 14px;Syntax not understood
486 border-radius: 12px;Unknown directive
488 border:Unknown directive
489 1px solid #d7b146;Syntax not understood
491 background: #09291f;Unknown directive
493 color: #f1d77a;Unknown directive
495 font-weight: 800;Unknown directive
497 transition: 0.2s;Unknown directive
498}Syntax not understood
500.add-button:hover {Unknown directive
501 background: #d7b146;Unknown directive
503 color: #062017;Unknown directive
504}Syntax not understood
506.empty {Syntax not understood
507 text-align: center;Unknown directive
509 padding: 60px 20px;Unknown directive
511 color: #a7a17d;Unknown directive
512}Syntax not understood
515/* MODAL */Syntax not understood
517.overlay {Syntax not understood
518 position: fixed;Unknown directive
520 inset: 0;Unknown directive
522 z-index: 2000;Unknown directive
524 background:Unknown directive
525 rgba(0,0,0,0.75);Syntax not understood
527 display: none;Unknown directive
529 align-items: center;Unknown directive
531 justify-content: center;Unknown directive
533 padding: 18px;Unknown directive
534}Syntax not understood
536.overlay.show {Syntax not understood
537 display: flex;Unknown directive
538}Syntax not understood
540.modal {Syntax not understood
541 width:Unknown directive
542 min(950px, 100%);Syntax not understood
544 max-height: 92vh;Unknown directive
546 overflow-y: auto;Unknown directive
548 position: relative;Unknown directive
550 border-radius: 24px;Unknown directive
552 background:Unknown directive
553 linear-gradient(Syntax not understood
554 180deg,Syntax not understood
557 );Syntax not understood
559 border:Unknown directive
560 1px solidSyntax not understood
561 rgba(215,177,70,0.35);Syntax not understood
563 box-shadow:Unknown directive
564 0 25px 70pxSyntax not understood
565 rgba(0,0,0,0.55);Syntax not understood
566}Syntax not understood
568.close-btn {Syntax not understood
569 position: fixed;Unknown directive
571 z-index: 2100;Unknown directive
573 top: 24px;Unknown directive
575 right: 28px;Unknown directive
577 width: 42px;Unknown directive
579 height: 42px;Unknown directive
581 border-radius: 50%;Unknown directive
583 border:Unknown directive
584 1px solid #d7b146;Syntax not understood
586 background: #08251c;Unknown directive
588 color: #f1d77a;Unknown directive
590 font-size: 24px;Unknown directive
591}Syntax not understood
593.detail {Syntax not understood
594 padding: 30px;Unknown directive
595}Syntax not understood
597.detail-grid {Syntax not understood
598 display: grid;Unknown directive
600 grid-template-columns:Unknown directive
601 1fr 1fr;Syntax not understood
603 gap: 30px;Unknown directive
604}Syntax not understood
606.detail-main-image {Syntax not understood
607 width: 100%;Unknown directive
609 height: 430px;Unknown directive
611 object-fit: contain;Unknown directive
613 border-radius: 18px;Unknown directive
615 background: white;Unknown directive
616}Syntax not understood
618.gallery {Syntax not understood
619 margin-top: 12px;Unknown directive
621 display: grid;Unknown directive
623 grid-template-columns:Unknown directive
624 repeat(6, 1fr);Syntax not understood
626 gap: 8px;Unknown directive
627}Syntax not understood
629.gallery img {Syntax not understood
630 width: 100%;Unknown directive
632 height: 75px;Unknown directive
634 object-fit: cover;Unknown directive
636 border-radius: 8px;Unknown directive
638 cursor: pointer;Unknown directive
640 background: white;Unknown directive
642 border:Unknown directive
643 1px solidSyntax not understood
644 rgba(215,177,70,0.25);Syntax not understood
645}Syntax not understood
647.detail-category {Syntax not understood
648 font-size: 12px;Unknown directive
650 color: #aaa16f;Unknown directive
652 text-transform: uppercase;Unknown directive
654 letter-spacing: 1px;Unknown directive
655}Syntax not understood
657.detail-title {Syntax not understood
658 color: #f1d77a;Unknown directive
660 font-size: 30px;Unknown directive
662 margin:Unknown directive
663 8px 0 15px;Syntax not understood
664}Syntax not understood
666.detail-price {Syntax not understood
667 color: #f1d77a;Unknown directive
669 font-size: 27px;Unknown directive
671 font-weight: 800;Unknown directive
672}Syntax not understood
674.detail-mrp {Syntax not understood
675 color: #898872;Unknown directive
677 text-decoration: line-through;Unknown directive
679 margin-left: 10px;Unknown directive
680}Syntax not understood
682.detail-weight {Syntax not understood
683 color: #c6c4ab;Unknown directive
685 margin-top: 8px;Unknown directive
686}Syntax not understood
688.detail-section {Syntax not understood
689 margin-top: 23px;Unknown directive
690}Syntax not understood
692.detail-section h3 {Syntax not understood
693 color: #d7b146;Unknown directive
695 font-size: 15px;Unknown directive
697 margin-bottom: 8px;Unknown directive
698}Syntax not understood
700.detail-section p {Syntax not understood
701 color: #d0d0bc;Unknown directive
703 line-height: 1.7;Unknown directive
705 font-size: 14px;Unknown directive
707 white-space: pre-line;Unknown directive
708}Syntax not understood
710.quantity {Syntax not understood
711 display: flex;Unknown directive
713 align-items: center;Unknown directive
715 gap: 15px;Unknown directive
717 margin-top: 20px;Unknown directive
718}Syntax not understood
720.qty-btn {Syntax not understood
721 width: 38px;Unknown directive
723 height: 38px;Unknown directive
725 border-radius: 50%;Unknown directive
727 border:Unknown directive
728 1px solid #d7b146;Syntax not understood
730 background: #09291f;Unknown directive
732 color: #f1d77a;Unknown directive
734 font-size: 20px;Unknown directive
735}Syntax not understood
737.qty-number {Syntax not understood
738 font-weight: 800;Unknown directive
740 min-width: 25px;Unknown directive
742 text-align: center;Unknown directive
743}Syntax not understood
745.detail-add {Syntax not understood
746 width: 100%;Unknown directive
748 margin-top: 18px;Unknown directive
750 padding: 14px;Unknown directive
752 border-radius: 13px;Unknown directive
754 border:Unknown directive
755 1px solid #d7b146;Syntax not understood
757 background: #09291f;Unknown directive
759 color: #f1d77a;Unknown directive
761 font-size: 16px;Unknown directive
763 font-weight: 800;Unknown directive
764}Syntax not understood
766.detail-add:hover {Unknown directive
767 background: #d7b146;Unknown directive
769 color: #062017;Unknown directive
770}Syntax not understood
773.track-button {Syntax not understood
774 border: 1px solid #d7b146;Unknown directive
775 background: #09291f;Unknown directive
776 color: #f1d77a;Unknown directive
777 padding: 11px 16px;Unknown directive
778 border-radius: 30px;Unknown directive
779 font-size: 14px;Unknown directive
780 font-weight: 700;Unknown directive
781 cursor: pointer;Unknown directive
782}Syntax not understood
784.track-button:hover {Unknown directive
785 background: #d7b146;Unknown directive
786 color: #062017;Unknown directive
787}Syntax not understood
789.tracking-result {Syntax not understood
790 margin-top: 16px;Unknown directive
791 padding: 15px;Unknown directive
792 border-radius: 12px;Unknown directive
793 background: #09291f;Unknown directive
794 border: 1px solid rgba(215,177,70,0.22);Unknown directive
795 color: #d7d3b5;Unknown directive
796 line-height: 1.7;Unknown directive
797 font-size: 14px;Unknown directive
798}Syntax not understood
800.tracking-status {Syntax not understood
801 display: inline-block;Unknown directive
802 margin-top: 8px;Unknown directive
803 padding: 6px 11px;Unknown directive
804 border-radius: 20px;Unknown directive
805 background: #d7b146;Unknown directive
806 color: #062017;Unknown directive
807 font-weight: 800;Unknown directive
808}Syntax not understood
810@media (max-width: 650px) {Unknown directive
811 .header-inner {Syntax not understood
812 gap: 8px;Unknown directive
813 }Syntax not understood
815 .track-button {Syntax not understood
816 padding: 9px 11px;Unknown directive
817 font-size: 12px;Unknown directive
818 }Syntax not understood
819}Syntax not understood
821/* CART */Syntax not understood
823.cart-drawer {Syntax not understood
824 position: fixed;Unknown directive
826 z-index: 3000;Unknown directive
828 top: 0;Unknown directive
830 right: -430px;Unknown directive
832 width:Unknown directive
833 min(430px, 100%);Syntax not understood
835 height: 100vh;Unknown directive
837 background: #061d16;Unknown directive
839 border-left:Unknown directive
840 1px solidSyntax not understood
841 rgba(215,177,70,0.35);Syntax not understood
843 box-shadow:Unknown directive
844 -15px 0 45pxSyntax not understood
845 rgba(0,0,0,0.4);Syntax not understood
847 transition:Unknown directive
848 right 0.3s ease;Syntax not understood
850 display: flex;Unknown directive
852 flex-direction: column;Unknown directive
853}Syntax not understood
855.cart-drawer.open {Syntax not understood
856 right: 0;Unknown directive
857}Syntax not understood
859.cart-head {Syntax not understood
860 padding: 20px;Unknown directive
862 display: flex;Unknown directive
864 justify-content: space-between;Unknown directive
866 align-items: center;Unknown directive
868 border-bottom:Unknown directive
869 1px solidSyntax not understood
870 rgba(215,177,70,0.2);Syntax not understood
871}Syntax not understood
873.cart-head h2 {Syntax not understood
874 color: #f1d77a;Unknown directive
875}Syntax not understood
877.cart-close {Syntax not understood
878 border: none;Unknown directive
880 background: none;Unknown directive
882 color: #f1d77a;Unknown directive
884 font-size: 25px;Unknown directive
885}Syntax not understood
887.cart-items {Syntax not understood
888 flex: 1;Unknown directive
890 overflow-y: auto;Unknown directive
892 padding: 18px;Unknown directive
893}Syntax not understood
895.cart-item {Syntax not understood
896 display: flex;Unknown directive
898 gap: 12px;Unknown directive
900 padding: 12px 0;Unknown directive
902 border-bottom:Unknown directive
903 1px solidSyntax not understood
904 rgba(215,177,70,0.13);Syntax not understood
905}Syntax not understood
907.cart-item img {Syntax not understood
908 width: 70px;Unknown directive
910 height: 70px;Unknown directive
912 object-fit: cover;Unknown directive
914 background: white;Unknown directive
916 border-radius: 10px;Unknown directive
917}Syntax not understood
919.cart-info {Syntax not understood
920 flex: 1;Unknown directive
921}Syntax not understood
923.cart-info h4 {Syntax not understood
924 color: #f1d77a;Unknown directive
926 font-size: 14px;Unknown directive
927}Syntax not understood
929.cart-info p {Syntax not understood
930 color: #bbb89f;Unknown directive
932 font-size: 13px;Unknown directive
934 margin-top: 5px;Unknown directive
935}Syntax not understood
937.cart-qty {Syntax not understood
938 display: flex;Unknown directive
940 align-items: center;Unknown directive
942 gap: 7px;Unknown directive
944 margin-top: 8px;Unknown directive
945}Syntax not understood
947.cart-qty button {Syntax not understood
948 width: 27px;Unknown directive
950 height: 27px;Unknown directive
952 border-radius: 50%;Unknown directive
954 border:Unknown directive
955 1px solid #d7b146;Syntax not understood
957 background: #09291f;Unknown directive
959 color: #f1d77a;Unknown directive
960}Syntax not understood
962.cart-footer {Syntax not understood
963 padding: 18px;Unknown directive
965 border-top:Unknown directive
966 1px solidSyntax not understood
967 rgba(215,177,70,0.2);Syntax not understood
968}Syntax not understood
970.total-row {Syntax not understood
971 display: flex;Unknown directive
973 justify-content: space-between;Unknown directive
975 color: #f1d77a;Unknown directive
977 font-size: 18px;Unknown directive
979 font-weight: 800;Unknown directive
981 margin-bottom: 14px;Unknown directive
982}Syntax not understood
984.checkout-button {Syntax not understood
985 width: 100%;Unknown directive
987 padding: 14px;Unknown directive
989 border-radius: 13px;Unknown directive
991 border:Unknown directive
992 1px solid #d7b146;Syntax not understood
994 background: #d7b146;Unknown directive
996 color: #062017;Unknown directive
998 font-weight: 800;Unknown directive
1000 font-size: 15px;Unknown directive
1001}Syntax not understood
1003.continue-button {Syntax not understood
1004 width: 100%;Unknown directive
1006 padding: 12px;Unknown directive
1008 margin-top: 9px;Unknown directive
1010 border-radius: 13px;Unknown directive
1012 border:Unknown directive
1013 1px solid #d7b146;Syntax not understood
1015 background: #09291f;Unknown directive
1017 color: #f1d77a;Unknown directive
1019 font-weight: 700;Unknown directive
1020}Syntax not understood
1023/* CHECKOUT */Syntax not understood
1025.checkout-modal {Syntax not understood
1026 position: relative;Unknown directive
1028 width:Unknown directive
1029 min(600px, 100%);Syntax not understood
1031 max-height: 92vh;Unknown directive
1033 overflow-y: auto;Unknown directive
1035 border-radius: 23px;Unknown directive
1037 padding: 25px;Unknown directive
1039 background: #061d16;Unknown directive
1041 border:Unknown directive
1042 1px solidSyntax not understood
1043 rgba(215,177,70,0.35);Syntax not understood
1044}Syntax not understood
1046.checkout-modal h2 {Syntax not understood
1047 color: #f1d77a;Unknown directive
1049 margin-bottom: 18px;Unknown directive
1051 padding-right: 48px;Unknown directive
1052}Syntax not understood
1054.checkout-close {Syntax not understood
1055 position: absolute;Unknown directive
1056 top: 14px;Unknown directive
1057 right: 14px;Unknown directive
1058 width: 38px;Unknown directive
1059 height: 38px;Unknown directive
1060 border: 1px solid rgba(215,177,70,0.45);Unknown directive
1061 border-radius: 50%;Unknown directive
1062 background: #09291f;Unknown directive
1063 color: #f1d77a;Unknown directive
1064 font-size: 24px;Unknown directive
1065 line-height: 36px;Unknown directive
1066 text-align: center;Unknown directive
1067 cursor: pointer;Unknown directive
1068 z-index: 5;Unknown directive
1069}Syntax not understood
1071.checkout-close:hover {Unknown directive
1072 background: #123c2d;Unknown directive
1073}Syntax not understood
1075.form-group {Syntax not understood
1076 margin-bottom: 13px;Unknown directive
1077}Syntax not understood
1079.form-group label {Syntax not understood
1080 display: block;Unknown directive
1082 color: #c8c5a9;Unknown directive
1084 font-size: 13px;Unknown directive
1086 margin-bottom: 6px;Unknown directive
1087}Syntax not understood
1089.form-group input,Syntax not understood
1090.form-group textarea {Syntax not understood
1091 width: 100%;Unknown directive
1093 border-radius: 10px;Unknown directive
1095 border:Unknown directive
1096 1px solidSyntax not understood
1097 rgba(215,177,70,0.3);Syntax not understood
1099 background: #09291f;Unknown directive
1101 color: #f1d77a;Unknown directive
1103 padding: 12px;Unknown directive
1105 outline: none;Unknown directive
1106}Syntax not understood
1108.form-group textarea {Syntax not understood
1109 min-height: 80px;Unknown directive
1111 resize: vertical;Unknown directive
1112}Syntax not understood
1114.payment-box {Syntax not understood
1115 margin: 15px 0;Unknown directive
1117 padding: 13px;Unknown directive
1119 border:Unknown directive
1120 1px solidSyntax not understood
1121 rgba(215,177,70,0.2);Syntax not understood
1123 border-radius: 12px;Unknown directive
1124}Syntax not understood
1126.payment-box label {Syntax not understood
1127 display: block;Unknown directive
1129 margin: 9px 0;Unknown directive
1131 color: #d4d0b1;Unknown directive
1132}Syntax not understood
1134.order-summary {Syntax not understood
1135 margin: 15px 0;Unknown directive
1137 padding: 14px;Unknown directive
1139 border-radius: 12px;Unknown directive
1141 background: #09291f;Unknown directive
1143 color: #d7d3b5;Unknown directive
1144}Syntax not understood
1146.place-order {Syntax not understood
1147 width: 100%;Unknown directive
1149 padding: 14px;Unknown directive
1151 border-radius: 12px;Unknown directive
1153 border:Unknown directive
1154 1px solid #d7b146;Syntax not understood
1156 background: #d7b146;Unknown directive
1158 color: #062017;Unknown directive
1160 font-weight: 800;Unknown directive
1161}Syntax not understood
1163.success {Syntax not understood
1164 text-align: center;Unknown directive
1166 padding: 40px 20px;Unknown directive
1167}Syntax not understood
1169.success-icon {Syntax not understood
1170 font-size: 55px;Unknown directive
1172 margin-bottom: 12px;Unknown directive
1173}Syntax not understood
1175.success h2 {Syntax not understood
1176 color: #f1d77a;Unknown directive
1178 margin-bottom: 10px;Unknown directive
1179}Syntax not understood
1181.success p {Syntax not understood
1182 color: #c6c4aa;Unknown directive
1184 line-height: 1.6;Unknown directive
1185}Syntax not understood
1187.order-id {Syntax not understood
1188 color: #f1d77a;Unknown directive
1190 font-weight: 800;Unknown directive
1192 margin: 15px 0;Unknown directive
1193}Syntax not understood
1196/* FOOTER */Syntax not understood
1198.footer {Syntax not understood
1199 border-top:Unknown directive
1200 1px solidSyntax not understood
1201 rgba(215,177,70,0.18);Syntax not understood
1203 padding: 25px 20px;Unknown directive
1205 text-align: center;Unknown directive
1207 color: #8f8c73;Unknown directive
1209 font-size: 13px;Unknown directive
1210}Syntax not understood
1213/* RESPONSIVE */Syntax not understood
1215@media (max-width: 900px) {Unknown directive
1217 .product-grid {Syntax not understood
1218 grid-template-columns:Unknown directive
1219 repeat(3, minmax(0, 1fr));Syntax not understood
1220 }Syntax not understood
1222 .detail-grid {Syntax not understood
1223 grid-template-columns: 1fr;Unknown directive
1224 }Syntax not understood
1226}Syntax not understood
1228@media (max-width: 650px) {Unknown directive
1230 .header-inner {Syntax not understood
1231 min-height: 68px;Unknown directive
1232 }Syntax not understood
1234 /* ONLY MOBILE LOGO FIX */Syntax not understood
1236 .logo {Syntax not understood
1237 width: 58px;Unknown directive
1239 height: 58px;Unknown directive
1240 }Syntax not understood
1242 .hero {Syntax not understood
1243 aspect-ratio: 16 / 9;Unknown directive
1244 height: auto;Unknown directive
1245 border-radius: 18px;Unknown directive
1246 }Syntax not understood
1248 .hero-wrap {Syntax not understood
1249 margin-top: 15px;Unknown directive
1250 }Syntax not understood
1252 .product-grid {Syntax not understood
1253 grid-template-columns:Unknown directive
1254 repeat(2, minmax(0, 1fr));Syntax not understood
1256 gap: 12px;Unknown directive
1257 }Syntax not understood
1259 .product-image {Syntax not understood
1260 height: 190px;Unknown directive
1261 }Syntax not understood
1263 .product-content {Syntax not understood
1264 padding: 11px;Unknown directive
1265 }Syntax not understood
1267 .product-name {Syntax not understood
1268 font-size: 15px;Unknown directive
1269 }Syntax not understood
1271 .product-short {Syntax not understood
1272 font-size: 12px;Unknown directive
1273 }Syntax not understood
1275 .price {Syntax not understood
1276 font-size: 17px;Unknown directive
1277 }Syntax not understood
1279 .detail {Syntax not understood
1280 padding: 20px;Unknown directive
1281 }Syntax not understood
1283 .detail-main-image {Syntax not understood
1284 height: 330px;Unknown directive
1285 }Syntax not understood
1287 .gallery {Syntax not understood
1288 grid-template-columns:Unknown directive
1289 repeat(6, 1fr);Syntax not understood
1290 }Syntax not understood
1292 .gallery img {Syntax not understood
1293 height: 55px;Unknown directive
1294 }Syntax not understood
1296 .detail-title {Syntax not understood
1297 font-size: 24px;Unknown directive
1298 }Syntax not understood
1300}Syntax not understood
1302@media (max-width: 390px) {Unknown directive
1304 .product-grid {Syntax not understood
1305 grid-template-columns: 1fr;Unknown directive
1306 }Syntax not understood
1308 .product-image {Syntax not understood
1309 height: 250px;Unknown directive
1310 }Syntax not understood
1312}Syntax not understood
1314/* FOOTER LINKS */Syntax not understood
1315.footer-links {Syntax not understood
1316 display: flex;Unknown directive
1317 flex-wrap: wrap;Unknown directive
1318 justify-content: center;Unknown directive
1319 gap: 10px 18px;Unknown directive
1320 margin-top: 14px;Unknown directive
1321}Syntax not understood
1323.footer-links a {Syntax not understood
1324 color: #d7b146;Unknown directive
1325 text-decoration: none;Unknown directive
1326 font-size: 12px;Unknown directive
1327}Syntax not understood
1329.footer-links a:hover {Unknown directive
1330 text-decoration: underline;Unknown directive
1331}Syntax not understood
1334/* CUSTOMER ACCOUNT */Syntax not understood
1335.account-button {Syntax not understood
1336 border: 1px solid rgba(215,177,70,.55);Unknown directive
1337 background: rgba(9,41,31,.9);Unknown directive
1338 color: #f1d77a;Unknown directive
1339 border-radius: 10px;Unknown directive
1340 padding: 10px 14px;Unknown directive
1341 font-weight: 700;Unknown directive
1342 cursor: pointer;Unknown directive
1343}Syntax not understood
1344.account-modal {Syntax not understood
1345 width: min(520px, 94vw);Unknown directive
1346 max-height: 90vh;Unknown directive
1347 overflow: auto;Unknown directive
1348 background: #0b3326;Unknown directive
1349 border: 1px solid rgba(215,177,70,.35);Unknown directive
1350 border-radius: 18px;Unknown directive
1351 padding: 24px;Unknown directive
1352 box-shadow: 0 20px 70px rgba(0,0,0,.45);Unknown directive
1353}Syntax not understood
1354.account-modal h2 { margin: 0 0 8px; color: #d7b146; }Unknown directive
1355.account-modal p { color: #ddd9bd; }Unknown directive
1356.account-actions { display:flex; gap:10px; flex-wrap:wrap; margin-top:16px; }Unknown directive
1357.account-primary, .account-secondary, .account-danger {Syntax not understood
1358 border-radius: 10px; padding: 11px 15px; font-weight: 700; cursor:pointer;Unknown directive
1359}Syntax not understood
1360.account-primary { border:1px solid #d7b146; background:#d7b146; color:#062017; }Unknown directive
1361.account-secondary { border:1px solid rgba(215,177,70,.55); background:#09291f; color:#f1d77a; }Unknown directive
1362.account-danger { border:1px solid #a84b42; background:#3b1714; color:#ffd6d0; }Unknown directive
1363.account-close { float:right; border:0; background:transparent; color:#d7b146; font-size:28px; cursor:pointer; }Unknown directive
1364.account-note { font-size:12px; color:#a8a58d !important; line-height:1.5; }Unknown directive
1365.account-note strong { color:#f1d77a; }Unknown directive
1366.account-modal input:disabled { opacity:.72; cursor:not-allowed; }Unknown directive
1367.account-profile { background:#09291f; border-radius:12px; padding:15px; margin-top:14px; line-height:1.7; }Unknown directive
1370/* Launch countdown and launch-only showcase removed; normal storefront is shown. */Syntax not understood
1371</style>Syntax not understood
1373<script src="https://sdk.cashfree.com/js/v3/cashfree.js"></script>Unknown directive
1375</head>Syntax not understood
1377<body>Syntax not understood
1380<header class="header">Syntax not understood
1382 <div class="header-inner">Syntax not understood
1384 <imgSyntax not understood
1385 class="logo"Syntax not understood
1386 src="https://pub-f9f13e3b335f45acbe929a378e7bacb9.r2.dev/DHIVEEN%20NATURAL%20LOGO/ChatGPT%20Image%20Sep%2016%2C%202026%2C%2010_55_59%20PM.png"Unknown directive
1387 alt="DHIVEEN NATURAL"Syntax not understood
1388 >Syntax not understood
1390 <buttonSyntax not understood
1391 class="account-button"Syntax not understood
1392 onclick="openAccount()"Syntax not understood
1393 >Syntax not understood
1394 👤 My AccountSyntax not understood
1395 </button>Syntax not understood
1397 <buttonSyntax not understood
1398 class="track-button"Syntax not understood
1399 onclick="openTracking()"Syntax not understood
1400 >Syntax not understood
1401 📦 Track OrderSyntax not understood
1402 </button>Syntax not understood
1404 <buttonSyntax not understood
1405 class="cart-button"Syntax not understood
1406 onclick="openCart()"Syntax not understood
1407 >Syntax not understood
1408 🛒 CartSyntax not understood
1410 <spanSyntax not understood
1411 class="cart-count"Syntax not understood
1412 id="cartCount"Syntax not understood
1413 >0</span>Syntax not understood
1415 </button>Syntax not understood
1417 </div>Syntax not understood
1419</header>Syntax not understood
1422<section class="hero-wrap" id="normalHeroWrap">Syntax not understood
1423 <div class="hero" id="hero"><div class="hero-empty">Loading...</div></div>Syntax not understood
1424</section>Syntax not understood
1427<section class="search-wrap">Syntax not understood
1429 <inputSyntax not understood
1430 id="searchInput"Syntax not understood
1431 class="search-box"Syntax not understood
1432 type="search"Syntax not understood
1433 placeholder="Search products..."Syntax not understood
1434 autocomplete="off"Syntax not understood
1435 >Syntax not understood
1437</section>Syntax not understood
1440<sectionSyntax not understood
1441 class="category-wrap"Syntax not understood
1442 id="categories"Syntax not understood
1443></section>Syntax not understood
1446<main class="products-wrap">Syntax not understood
1448 <h2 class="section-title">Syntax not understood
1449 Our ProductsSyntax not understood
1450 </h2>Syntax not understood
1452 <divSyntax not understood
1453 class="product-grid"Syntax not understood
1454 id="productGrid"Syntax not understood
1455 >Syntax not understood
1457 <div class="empty">Syntax not understood
1458 Loading products...Syntax not understood
1459 </div>Syntax not understood
1461 </div>Syntax not understood
1463</main>Syntax not understood
1466<footer class="footer">Syntax not understood
1468 © 2026 DHIVEEN NATURALSyntax not understood
1470 <br>Syntax not understood
1472 Natural Handmade ProductsSyntax not understood
1474 <div class="footer-links">Syntax not understood
1475 <a href="/about-us">About Us</a>Syntax not understood
1476 <a href="/contact-us">Contact Us</a>Syntax not understood
1477 <a href="/pricing-policy">Pricing Policy</a>Syntax not understood
1478 <a href="/shipping-policy">Shipping Policy</a>Syntax not understood
1479 <a href="/terms-and-conditions">Terms &amp; Conditions</a>Syntax not understood
1480 <a href="/privacy-policy">Privacy Policy</a>Syntax not understood
1481 <a href="/cancellation-refund-policy">Cancellation / Refund Policy</a>Syntax not understood
1482 </div>Syntax not understood
1484</footer>Syntax not understood
1487<divSyntax not understood
1488 class="overlay"Syntax not understood
1489 id="detailOverlay"Syntax not understood
1490 onclick="closeDetailOutside(event)"Syntax not understood
1491>Syntax not understood
1493 <buttonSyntax not understood
1494 class="close-btn"Syntax not understood
1495 onclick="closeDetail()"Syntax not understood
1496 >Syntax not understood
1497 ×Syntax not understood
1498 </button>Syntax not understood
1500 <divSyntax not understood
1501 class="modal"Syntax not understood
1502 id="detailModal"Syntax not understood
1503 ></div>Syntax not understood
1505</div>Syntax not understood
1508<asideSyntax not understood
1509 class="cart-drawer"Syntax not understood
1510 id="cartDrawer"Syntax not understood
1511>Syntax not understood
1513 <div class="cart-head">Syntax not understood
1515 <h2>Your Cart</h2>Syntax not understood
1517 <buttonSyntax not understood
1518 class="cart-close"Syntax not understood
1519 onclick="closeCart()"Syntax not understood
1520 >Syntax not understood
1521 ×Syntax not understood
1522 </button>Syntax not understood
1524 </div>Syntax not understood
1526 <divSyntax not understood
1527 class="cart-items"Syntax not understood
1528 id="cartItems"Syntax not understood
1529 ></div>Syntax not understood
1531 <div class="cart-footer">Syntax not understood
1533 <div class="total-row">Syntax not understood
1535 <span>Total</span>Syntax not understood
1537 <span id="cartTotal">Syntax not understood
1538 ₹0Syntax not understood
1539 </span>Syntax not understood
1541 </div>Syntax not understood
1543 <buttonSyntax not understood
1544 class="checkout-button"Syntax not understood
1545 onclick="openCheckout()"Syntax not understood
1546 >Syntax not understood
1547 Proceed to CheckoutSyntax not understood
1548 </button>Syntax not understood
1550 <buttonSyntax not understood
1551 class="continue-button"Syntax not understood
1552 onclick="closeCart()"Syntax not understood
1553 >Syntax not understood
1554 Continue ShoppingSyntax not understood
1555 </button>Syntax not understood
1557 </div>Syntax not understood
1559</aside>Syntax not understood
1562<divSyntax not understood
1563 class="overlay"Syntax not understood
1564 id="accountOverlay"Syntax not understood
1565>Syntax not understood
1567 <divSyntax not understood
1568 class="account-modal"Syntax not understood
1569 id="accountContent"Syntax not understood
1570 ></div>Syntax not understood
1572</div>Syntax not understood
1575<divSyntax not understood
1576 class="overlay"Syntax not understood
1577 id="trackingOverlay"Syntax not understood
1578>Syntax not understood
1579 <divSyntax not understood
1580 class="checkout-modal tracking-modal"Syntax not understood
1581 id="trackingContent"Syntax not understood
1582 >Syntax not understood
1583 <h2>Track Your Order</h2>Syntax not understood
1585 <div class="form-group">Syntax not understood
1586 <label>Order ID</label>Syntax not understood
1587 <inputSyntax not understood
1588 id="trackingOrderId"Syntax not understood
1589 type="text"Syntax not understood
1590 placeholder="Example: DN12345678"Unknown directive
1591 autocomplete="off"Syntax not understood
1592 >Syntax not understood
1593 </div>Syntax not understood
1595 <div class="form-group">Syntax not understood
1596 <label>Mobile Number</label>Syntax not understood
1597 <inputSyntax not understood
1598 id="trackingMobile"Syntax not understood
1599 type="tel"Syntax not understood
1600 maxlength="10"Syntax not understood
1601 placeholder="10 digit mobile number"Syntax not understood
1602 autocomplete="tel"Syntax not understood
1603 >Syntax not understood
1604 </div>Syntax not understood
1606 <buttonSyntax not understood
1607 class="place-order"Syntax not understood
1608 id="trackOrderButton"Syntax not understood
1609 onclick="trackOrder()"Syntax not understood
1610 >Syntax not understood
1611 Track OrderSyntax not understood
1612 </button>Syntax not understood
1614 <div id="trackingResult"></div>Syntax not understood
1616 <buttonSyntax not understood
1617 class="continue-button"Syntax not understood
1618 onclick="closeTracking()"Syntax not understood
1619 >Syntax not understood
1620 CloseSyntax not understood
1621 </button>Syntax not understood
1622 </div>Syntax not understood
1623</div>Syntax not understood
1626<divSyntax not understood
1627 class="overlay"Syntax not understood
1628 id="checkoutOverlay"Syntax not understood
1629>Syntax not understood
1631 <divSyntax not understood
1632 class="checkout-modal"Syntax not understood
1633 id="checkoutContent"Syntax not understood
1634 >Syntax not understood
1636 <h2>Syntax not understood
1637 CheckoutSyntax not understood
1638 </h2>Syntax not understood
1640 <buttonSyntax not understood
1641 type="button"Syntax not understood
1642 class="checkout-close"Syntax not understood
1643 aria-label="Close checkout"Syntax not understood
1644 onclick="closeCheckoutAndContinue()"Syntax not understood
1645 >Syntax not understood
1646 ×Syntax not understood
1647 </button>Syntax not understood
1649 <div class="form-group">Syntax not understood
1651 <label>Syntax not understood
1652 Full NameSyntax not understood
1653 </label>Syntax not understood
1655 <inputSyntax not understood
1656 id="customerName"Syntax not understood
1657 type="text"Syntax not understood
1658 placeholder="Enter your name"Syntax not understood
1659 >Syntax not understood
1661 </div>Syntax not understood
1663 <div class="form-group">Syntax not understood
1665 <label>Syntax not understood
1666 Mobile NumberSyntax not understood
1667 </label>Syntax not understood
1669 <inputSyntax not understood
1670 id="customerMobile"Syntax not understood
1671 type="tel"Syntax not understood
1672 maxlength="10"Syntax not understood
1673 placeholder="10 digit mobile number"Syntax not understood
1674 >Syntax not understood
1676 </div>Syntax not understood
1678 <div class="form-group">Syntax not understood
1680 <label>Syntax not understood
1681 Full AddressSyntax not understood
1682 </label>Syntax not understood
1684 <textareaSyntax not understood
1685 id="customerAddress"Syntax not understood
1686 placeholder="House / Street / Area"Syntax not understood
1687 ></textarea>Syntax not understood
1689 </div>Syntax not understood
1691 <div class="form-group">Syntax not understood
1693 <label>Syntax not understood
1694 CitySyntax not understood
1695 </label>Syntax not understood
1697 <inputSyntax not understood
1698 id="customerCity"Syntax not understood
1699 type="text"Syntax not understood
1700 placeholder="City"Syntax not understood
1701 >Syntax not understood
1703 </div>Syntax not understood
1705 <div class="form-group">Syntax not understood
1707 <label>Syntax not understood
1708 StateSyntax not understood
1709 </label>Syntax not understood
1711 <inputSyntax not understood
1712 id="customerState"Syntax not understood
1713 type="text"Syntax not understood
1714 value="Tamil Nadu"Syntax not understood
1715 >Syntax not understood
1717 </div>Syntax not understood
1719 <div class="form-group">Syntax not understood
1721 <label>Syntax not understood
1722 PincodeSyntax not understood
1723 </label>Syntax not understood
1725 <inputSyntax not understood
1726 id="customerPincode"Syntax not understood
1727 type="text"Syntax not understood
1728 maxlength="6"Syntax not understood
1729 placeholder="Pincode"Syntax not understood
1730 >Syntax not understood
1732 </div>Syntax not understood
1734 <div class="payment-box">Syntax not understood
1736 <strong>Syntax not understood
1737 Payment MethodSyntax not understood
1738 </strong>Syntax not understood
1740 <label>Syntax not understood
1741 <inputSyntax not understood
1742 type="radio"Syntax not understood
1743 name="payment"Syntax not understood
1744 value="UPI"Syntax not understood
1745 >Syntax not understood
1746 UPI / Online PaymentSyntax not understood
1747 </label>Syntax not understood
1749 <label>Syntax not understood
1750 <inputSyntax not understood
1751 type="radio"Syntax not understood
1752 name="payment"Syntax not understood
1753 value="COD"Syntax not understood
1754 checkedSyntax not understood
1755 >Syntax not understood
1756 Cash on DeliverySyntax not understood
1757 </label>Syntax not understood
1759 </div>Syntax not understood
1761 <divSyntax not understood
1762 class="order-summary"Syntax not understood
1763 id="checkoutSummary"Syntax not understood
1764 ></div>Syntax not understood
1766 <buttonSyntax not understood
1767 class="place-order"Syntax not understood
1768 onclick="placeOrder()"Syntax not understood
1769 >Syntax not understood
1770 Place OrderSyntax not understood
1771 </button>Syntax not understood
1773 </div>Syntax not understood
1775</div>Syntax not understood
1778<script>Syntax not understood
1780let products = [];Syntax not understood
1782let heroes = [];Syntax not understood
1784let currentCategory = "ALL";Syntax not understood
1786let currentProduct = null;Syntax not understood
1788let detailQuantity = 1;Syntax not understood
1790let cart = [];Syntax not understood
1792try {Syntax not understood
1794 cart =Syntax not understood
1795 JSON.parse(Syntax not understood
1796 localStorage.getItem(Syntax not understood
1797 "dhiveen_cart"Syntax not understood
1798 ) || "[]"Syntax not understood
1799 );Syntax not understood
1801} catch (e) {Syntax not understood
1803 cart = [];Syntax not understood
1805}Syntax not understood
1807let delhiveryShippingQuote = null;Syntax not understood
1808let delhiveryQuoteTimer = null;Syntax not understood
1809let delhiveryQuoteRequestId = 0;Syntax not understood
1811function parseWeightToGrams(value) {Syntax not understood
1812 const text = String(value || "").trim().toLowerCase();Syntax not understood
1813 const match = text.match(/(\d+(?:\.\d+)?)\s*(kg|kgs|g|gram|grams)?/i);Unknown directive
1814 if (!match) return 0;Syntax not understood
1816 const amount = Number(match[1]);Syntax not understood
1817 if (!Number.isFinite(amount)) return 0;Syntax not understood
1819 const unit = String(match[2] || "g").toLowerCase();Syntax not understood
1820 return unit === "kg" || unit === "kgs" ? amount * 1000 : amount;Unknown directive
1821}Syntax not understood
1823function getCartWeightGrams() {Syntax not understood
1824 return cart.reduce(function (total, item) {Syntax not understood
1825 const product = products.find(function (p) {Syntax not understood
1826 return p.id === item.id;Syntax not understood
1827 });Syntax not understood
1829 if (!product) return total;Syntax not understood
1831 const grams = parseWeightToGrams(product.weight);Syntax not understood
1832 return total + (Number.isFinite(grams) ? grams : 0) * Number(item.quantity || 0);Unknown directive
1833 }, 0);Syntax not understood
1834}Syntax not understood
1836function getCheckoutProductTotal() {Syntax not understood
1837 return cart.reduce(function (total, item) {Syntax not understood
1838 const product = products.find(function (p) {Syntax not understood
1839 return p.id === item.id;Syntax not understood
1840 });Syntax not understood
1842 if (!product) return total;Syntax not understood
1844 return total +Syntax not understood
1845 numberPrice(product.sellingPrice) *Syntax not understood
1846 Number(item.quantity || 0);Syntax not understood
1847 }, 0);Syntax not understood
1848}Syntax not understood
1850function renderShippingStatus(message, type) {Syntax not understood
1851 const box = document.getElementById("shippingStatus");Syntax not understood
1852 if (!box) return;Syntax not understood
1854 const styles = {Syntax not understood
1855 loading: "color:#7a6a22;background:#fff9d8;border:1px solid #e7d56b;",Unknown directive
1856 success: "color:#1e6a2c;background:#eef9ef;border:1px solid #9bd3a5;",Unknown directive
1857 error: "color:#9a2d2d;background:#fff0f0;border:1px solid #e3a2a2;"Unknown directive
1858 };Syntax not understood
1860 box.style.cssText =Syntax not understood
1861 "margin-top:12px;padding:10px 12px;border-radius:10px;font-size:14px;" +Unknown directive
1862 (styles[type] || styles.loading);Syntax not understood
1863 box.innerHTML = escapeClient(message);Syntax not understood
1864}Syntax not understood
1866async function refreshDelhiveryShippingQuote() {Syntax not understood
1867 const pincodeInput = document.getElementById("customerPincode");Syntax not understood
1868 const paymentInput = document.querySelector('input[name="payment"]:checked');Unknown directive
1870 if (!pincodeInput || !paymentInput) return;Syntax not understood
1872 const pincode = pincodeInput.value.trim();Syntax not understood
1873 const paymentMethod = paymentInput.value;Syntax not understood
1874 const weightGrams = getCartWeightGrams();Syntax not understood
1876 delhiveryShippingQuote = null;Syntax not understood
1878 if (!/^\d{6}$/.test(pincode)) {Syntax not understood
1879 renderCheckoutSummary();Syntax not understood
1880 return;Syntax not understood
1881 }Syntax not understood
1883 if (!weightGrams) {Syntax not understood
1884 renderShippingStatus("Shipment weight could not be calculated.", "error");Syntax not understood
1885 renderCheckoutSummary();Syntax not understood
1886 return;Syntax not understood
1887 }Syntax not understood
1889 const requestId = ++delhiveryQuoteRequestId;Syntax not understood
1890 renderCheckoutSummary();Syntax not understood
1891 renderShippingStatus("Checking delivery availability & shipping charge...", "loading");Syntax not understood
1893 try {Syntax not understood
1894 const response = await fetch("/api/delhivery/shipping", {Syntax not understood
1895 method: "POST",Unknown directive
1896 headers: {Unknown directive
1897 "content-type": "application/json"Unknown directive
1898 },Syntax not understood
1899 body: JSON.stringify({Unknown directive
1900 pincode: pincode,Unknown directive
1901 weightGrams: weightGrams,Unknown directive
1902 paymentMethod: paymentMethod,Unknown directive
1903 codAmount: getCheckoutProductTotal()Unknown directive
1904 })Syntax not understood
1905 });Syntax not understood
1907 const data = await response.json();Syntax not understood
1909 if (requestId !== delhiveryQuoteRequestId) return;Syntax not understood
1911 if (!response.ok || !data.success) {Syntax not understood
1912 throw new Error(data.error || "Delivery is not available for this pincode.");Syntax not understood
1913 }Syntax not understood
1915 delhiveryShippingQuote = data;Syntax not understood
1917 let statusText =Syntax not understood
1918 "Delivery available • " +Syntax not understood
1919 "Shipping ₹" +Syntax not understood
1920 numberPrice(data.customerShipping).toLocaleString("en-IN", { maximumFractionDigits: 2 });Unknown directive
1922 if (paymentMethod === "COD" && Number(data.codCharge || 0) > 0) {Syntax not understood
1923 statusText +=Syntax not understood
1924 " • COD charge ₹" +Syntax not understood
1925 numberPrice(data.codCharge).toLocaleString("en-IN", { maximumFractionDigits: 2 });Unknown directive
1926 }Syntax not understood
1928 renderCheckoutSummary();Syntax not understood
1929 renderShippingStatus(statusText, "success");Syntax not understood
1930 } catch (error) {Syntax not understood
1931 if (requestId !== delhiveryQuoteRequestId) return;Syntax not understood
1933 delhiveryShippingQuote = null;Syntax not understood
1934 renderCheckoutSummary();Syntax not understood
1935 renderShippingStatus(error.message || "Unable to calculate shipping.", "error");Syntax not understood
1936 }Syntax not understood
1937}Syntax not understood
1939function scheduleDelhiveryShippingQuote() {Syntax not understood
1940 clearTimeout(delhiveryQuoteTimer);Syntax not understood
1941 delhiveryQuoteTimer = setTimeout(function () {Syntax not understood
1942 refreshDelhiveryShippingQuote();Syntax not understood
1943 }, 450);Syntax not understood
1944}Syntax not understood
1947function closeCheckoutAndTrack() {Syntax not understood
1948 document.getElementById("checkoutOverlay").classList.remove("show");Syntax not understood
1950 const lastOrder = localStorage.getItem("dhiveen_last_order");Syntax not understood
1952 if (lastOrder) {Syntax not understood
1953 try {Syntax not understood
1954 const order = JSON.parse(lastOrder);Syntax not understood
1955 document.getElementById("trackingOrderId").value =Syntax not understood
1956 order.orderId || "";Syntax not understood
1957 document.getElementById("trackingMobile").value =Syntax not understood
1958 (order.customer && order.customer.mobile) || "";Syntax not understood
1959 } catch (e) {Syntax not understood
1960 console.error(e);Syntax not understood
1961 }Syntax not understood
1962 }Syntax not understood
1964 openTracking();Syntax not understood
1965}Syntax not understood
1968async function loadWebsite() {Syntax not understood
1970 // Products and hero load independently so a slow banner never blocksSyntax not understood
1971 // the product UI from becoming usable.Syntax not understood
1972 const productsPromise = loadProducts().then(function () {Syntax not understood
1973 renderCategories();Syntax not understood
1974 renderProducts();Syntax not understood
1975 updateCart();Syntax not understood
1976 });Syntax not understood
1978 const heroesPromise = loadHeroes();Syntax not understood
1980 await Promise.allSettled([Syntax not understood
1981 productsPromise,Syntax not understood
1982 heroesPromiseSyntax not understood
1983 ]);Syntax not understood
1985 updateCart();Syntax not understood
1986 startProductAutoRefresh_();Syntax not understood
1988}Syntax not understood
1990let productRefreshTimer = null;Syntax not understood
1992function startProductAutoRefresh_() {Syntax not understood
1993 if (productRefreshTimer) {Syntax not understood
1994 clearInterval(productRefreshTimer);Syntax not understood
1995 }Syntax not understood
1997 productRefreshTimer = setInterval(async function () {Syntax not understood
1998 // Avoid background requests while the tab is hidden.Syntax not understood
1999 if (document.hidden) return;Syntax not understood
2001 const before = JSON.stringify(products);Syntax not understood
2003 await loadProducts();Syntax not understood
2005 const after = JSON.stringify(products);Syntax not understood
2007 // Only repaint the product grid when the Sheet data actually changed.Syntax not understood
2008 if (before !== after) {Syntax not understood
2009 renderCategories();Syntax not understood
2010 renderProducts();Syntax not understood
2011 renderLaunchShowcase_();Syntax not understood
2012 updateCart();Syntax not understood
2013 }Syntax not understood
2014 }, 30000);Syntax not understood
2015}Syntax not understood
2018async function loadProducts() {Syntax not understood
2020 const grid =Syntax not understood
2021 document.getElementById(Syntax not understood
2022 "productGrid"Syntax not understood
2023 );Syntax not understood
2025 try {Syntax not understood
2027 const response =Syntax not understood
2028 await fetch(Syntax not understood
2029 "/api/products?v=" +Syntax not understood
2030 Math.floor(Date.now() / 30000),Syntax not understood
2031 {Syntax not understood
2032 cache: "no-store"Unknown directive
2033 }Syntax not understood
2034 );Syntax not understood
2036 const data =Syntax not understood
2037 await response.json();Syntax not understood
2039 if (Syntax not understood
2040 !data.success ||Syntax not understood
2041 !Array.isArray(Syntax not understood
2042 data.productsSyntax not understood
2043 )Syntax not understood
2044 ) {Syntax not understood
2046 throw new Error(Syntax not understood
2047 data.error ||Syntax not understood
2048 "Product data unavailable"Syntax not understood
2049 );Syntax not understood
2051 }Syntax not understood
2053 products =Syntax not understood
2054 data.products;Syntax not understood
2056 if (!products.length) {Syntax not understood
2058 grid.innerHTML =Syntax not understood
2059 '<div class="empty">' +Syntax not understood
2060 'No active products found.<br>' +Syntax not understood
2061 'Please check Product Sheet Status.' +Syntax not understood
2062 '</div>';Syntax not understood
2064 }Syntax not understood
2066 } catch (error) {Syntax not understood
2068 console.error(error);Syntax not understood
2070 grid.innerHTML =Syntax not understood
2071 '<div class="empty">' +Syntax not understood
2072 '<strong>Products could not be loaded.</strong>' +Syntax not understood
2073 '<br><br>' +Syntax not understood
2074 escapeClient(Syntax not understood
2075 error.messageSyntax not understood
2076 ) +Syntax not understood
2077 '<br><br>' +Syntax not understood
2078 'Please check that the Product tab is published.' +Syntax not understood
2079 '</div>';Syntax not understood
2081 }Syntax not understood
2083}Syntax not understood
2086async function loadHeroes() {Syntax not understood
2088 const hero =Syntax not understood
2089 document.getElementById(Syntax not understood
2090 "hero"Syntax not understood
2091 );Syntax not understood
2093 try {Syntax not understood
2095 const response =Syntax not understood
2096 await fetch(Syntax not understood
2097 "/api/heroes?v=" +Syntax not understood
2098 Math.floor(Date.now() / 30000),Syntax not understood
2099 {Syntax not understood
2100 cache: "no-store"Unknown directive
2101 }Syntax not understood
2102 );Syntax not understood
2104 const data =Syntax not understood
2105 await response.json();Syntax not understood
2107 if (Syntax not understood
2108 !data.success ||Syntax not understood
2109 !Array.isArray(Syntax not understood
2110 data.heroesSyntax not understood
2111 )Syntax not understood
2112 ) {Syntax not understood
2114 throw new Error(Syntax not understood
2115 data.error ||Syntax not understood
2116 "Hero data unavailable"Syntax not understood
2117 );Syntax not understood
2119 }Syntax not understood
2121 heroes =Syntax not understood
2122 data.heroes;Syntax not understood
2124 renderHero();Syntax not understood
2126 } catch (error) {Syntax not understood
2128 console.error(error);Syntax not understood
2130 hero.innerHTML =Syntax not understood
2131 '<div class="hero-empty">' +Syntax not understood
2132 'Hero banner unavailable' +Syntax not understood
2133 '</div>';Syntax not understood
2135 }Syntax not understood
2137}Syntax not understood
2140let heroIndex = 0;Syntax not understood
2142let heroTimer = null;Syntax not understood
2145function renderHero() {Syntax not understood
2147 const hero =Syntax not understood
2148 document.getElementById("hero");Syntax not understood
2150 if (!heroes.length) {Syntax not understood
2151 hero.innerHTML =Syntax not understood
2152 '<div class="hero-empty">' +Syntax not understood
2153 'DHIVEEN NATURAL' +Syntax not understood
2154 '</div>';Syntax not understood
2155 return;Syntax not understood
2156 }Syntax not understood
2158 if (heroTimer) {Syntax not understood
2159 clearInterval(heroTimer);Syntax not understood
2160 heroTimer = null;Syntax not understood
2161 }Syntax not understood
2163 // Preload the first banner and the next two banners so the 5-secondSyntax not understood
2164 // rotation does not pause while an image is downloading.Syntax not understood
2165 preloadHeroImages_(0, 3);Syntax not understood
2167 hero.innerHTML =Syntax not understood
2168 '<picture>' +Syntax not understood
2169 '<source id="heroMobileSource" media="(max-width: 767px)" srcset="' +Unknown directive
2170 escapeClient(heroes[0].mobileImage || heroes[0].desktopImage) +Syntax not understood
2171 '">' +Syntax not understood
2172 '<img id="heroImage" src="' +Syntax not understood
2173 escapeClient(heroes[0].desktopImage || heroes[0].mobileImage) +Syntax not understood
2174 '" alt="DHIVEEN NATURAL Banner" fetchpriority="high" decoding="async">' +Syntax not understood
2175 '</picture>';Syntax not understood
2177 heroIndex = 0;Syntax not understood
2179 heroTimer = setInterval(function () {Syntax not understood
2180 const image = document.getElementById("heroImage");Syntax not understood
2181 const mobileSource = document.getElementById("heroMobileSource");Syntax not understood
2183 if (!image) return;Syntax not understood
2185 const nextIndex = (heroIndex + 1) % heroes.length;Syntax not understood
2186 const nextHero = heroes[nextIndex];Syntax not understood
2187 const nextDesktop = nextHero.desktopImage || nextHero.mobileImage;Syntax not understood
2188 const nextMobile = nextHero.mobileImage || nextHero.desktopImage;Syntax not understood
2190 // Keep the next banner ready before switching the visible image.Syntax not understood
2191 preloadHeroImages_(nextIndex, 2);Syntax not understood
2193 image.classList.add("fade");Syntax not understood
2195 setTimeout(function () {Syntax not understood
2196 heroIndex = nextIndex;Syntax not understood
2198 if (mobileSource) {Syntax not understood
2199 mobileSource.srcset = nextMobile;Syntax not understood
2200 }Syntax not understood
2202 image.src = nextDesktop;Syntax not understood
2203 image.onload = function () {Syntax not understood
2204 image.classList.remove("fade");Syntax not understood
2205 };Syntax not understood
2207 // If the image is already cached, onload may have fired before theSyntax not understood
2208 // handler was attached. Make sure the banner never stays faded.Syntax not understood
2209 if (image.complete) {Syntax not understood
2210 image.classList.remove("fade");Syntax not understood
2211 }Syntax not understood
2212 }, 450);Syntax not understood
2213 }, 5000);Syntax not understood
2214}Syntax not understood
2216function preloadHeroImages_(startIndex, count) {Syntax not understood
2217 if (!heroes.length) return;Syntax not understood
2219 const isMobile =Syntax not understood
2220 window.matchMedia &&Syntax not understood
2221 window.matchMedia("(max-width: 767px)").matches;Unknown directive
2223 for (let offset = 0; offset < count; offset++) {Syntax not understood
2224 const index = (startIndex + offset) % heroes.length;Syntax not understood
2225 const item = heroes[index];Syntax not understood
2226 if (!item) continue;Syntax not understood
2228 const src = isMobileSyntax not understood
2229 ? (item.mobileImage || item.desktopImage)Syntax not understood
2230 : (item.desktopImage || item.mobileImage);Unknown directive
2232 if (!src) continue;Syntax not understood
2234 const img = new Image();Syntax not understood
2235 img.decoding = "async";Syntax not understood
2236 img.src = src;Syntax not understood
2237 }Syntax not understood
2238}Syntax not understood
2240function renderCategories() {Syntax not understood
2242 const box =Syntax not understood
2243 document.getElementById(Syntax not understood
2244 "categories"Syntax not understood
2245 );Syntax not understood
2247 const categories = [Syntax not understood
2248 "ALL"Syntax not understood
2249 ];Syntax not understood
2251 products.forEach(Syntax not understood
2252 function (product) {Syntax not understood
2254 const category =Syntax not understood
2255 product.category.trim();Syntax not understood
2257 if (Syntax not understood
2258 category &&Syntax not understood
2259 !categories.includes(Syntax not understood
2260 categorySyntax not understood
2261 )Syntax not understood
2262 ) {Syntax not understood
2264 categories.push(Syntax not understood
2265 categorySyntax not understood
2266 );Syntax not understood
2268 }Syntax not understood
2270 }Syntax not understood
2271 );Syntax not understood
2273 box.innerHTML =Syntax not understood
2274 categories.map(Syntax not understood
2275 function (category) {Syntax not understood
2277 const active =Syntax not understood
2278 category ===Syntax not understood
2279 currentCategorySyntax not understood
2280 ? "active"Syntax not understood
2281 : "";Unknown directive
2283 return (Syntax not understood
2284 '<button class="category-btn ' +Syntax not understood
2285 active +Syntax not understood
2286 '" onclick="selectCategory(\'' +Syntax not understood
2287 encodeJS(category) +Syntax not understood
2288 '\')">' +Syntax not understood
2289 escapeClient(category) +Syntax not understood
2290 '</button>'Syntax not understood
2291 );Syntax not understood
2293 }Syntax not understood
2294 ).join("");Syntax not understood
2296}Syntax not understood
2299function selectCategory(category) {Syntax not understood
2301 currentCategory =Syntax not understood
2302 category;Syntax not understood
2304 renderCategories();Syntax not understood
2306 renderProducts();Syntax not understood
2308}Syntax not understood
2311function renderProducts() {Syntax not understood
2313 const grid =Syntax not understood
2314 document.getElementById(Syntax not understood
2315 "productGrid"Syntax not understood
2316 );Syntax not understood
2318 const search =Syntax not understood
2319 documentSyntax not understood
2320 .getElementById(Syntax not understood
2321 "searchInput"Syntax not understood
2322 )Syntax not understood
2323 .valueSyntax not understood
2324 .trim()Syntax not understood
2325 .toLowerCase();Syntax not understood
2327 const filtered =Syntax not understood
2328 products.filter(Syntax not understood
2329 function (product) {Syntax not understood
2331 const categoryMatch =Syntax not understood
2332 currentCategory ===Syntax not understood
2333 "ALL" ||Syntax not understood
2334 product.category ===Syntax not understood
2335 currentCategory;Syntax not understood
2337 const searchText =Syntax not understood
2338 (Syntax not understood
2339 product.name +Syntax not understood
2340 " " +Syntax not understood
2341 product.category +Syntax not understood
2342 " " +Syntax not understood
2343 product.shortDescription +Syntax not understood
2344 " " +Syntax not understood
2345 product.ingredientsSyntax not understood
2346 ).toLowerCase();Syntax not understood
2348 const searchMatch =Syntax not understood
2349 !search ||Syntax not understood
2350 searchText.includes(Syntax not understood
2351 searchSyntax not understood
2352 );Syntax not understood
2354 return (Syntax not understood
2355 categoryMatch &&Syntax not understood
2356 searchMatchSyntax not understood
2357 );Syntax not understood
2359 }Syntax not understood
2360 );Syntax not understood
2362 if (!filtered.length) {Syntax not understood
2364 grid.innerHTML =Syntax not understood
2365 '<div class="empty">' +Syntax not understood
2366 'No products found.' +Syntax not understood
2367 '</div>';Syntax not understood
2369 return;Syntax not understood
2371 }Syntax not understood
2373 grid.innerHTML =Syntax not understood
2374 filtered.map(Syntax not understood
2375 function (product) {Syntax not understood
2377 const image =Syntax not understood
2378 product.images[0];Syntax not understood
2380 const price =Syntax not understood
2381 formatPrice(Syntax not understood
2382 product.sellingPriceSyntax not understood
2383 );Syntax not understood
2385 const mrp =Syntax not understood
2386 formatPrice(Syntax not understood
2387 product.mrpSyntax not understood
2388 );Syntax not understood
2390 return (Syntax not understood
2392 '<article class="product-card" ' +Syntax not understood
2393 'onclick="openProduct(\'' +Syntax not understood
2394 encodeJS(product.id) +Syntax not understood
2395 '\')">' +Syntax not understood
2397 '<img class="product-image" ' +Syntax not understood
2398 'src="' +Syntax not understood
2399 escapeClient(image) +Syntax not understood
2400 '" ' +Syntax not understood
2401 'alt="' +Syntax not understood
2402 escapeClient(Syntax not understood
2403 product.nameSyntax not understood
2404 ) +Syntax not understood
2405 '" ' +Syntax not understood
2406 'loading="lazy">' +Syntax not understood
2408 '<div class="product-content">' +Syntax not understood
2410 '<div class="product-category">' +Syntax not understood
2411 escapeClient(Syntax not understood
2412 product.categorySyntax not understood
2413 ) +Syntax not understood
2414 '</div>' +Syntax not understood
2416 '<div class="product-name">' +Syntax not understood
2417 escapeClient(Syntax not understood
2418 product.nameSyntax not understood
2419 ) +Syntax not understood
2420 '</div>' +Syntax not understood
2422 '<div class="product-short">' +Syntax not understood
2423 escapeClient(Syntax not understood
2424 product.shortDescriptionSyntax not understood
2425 ) +Syntax not understood
2426 '</div>' +Syntax not understood
2428 '<div class="price-row">' +Syntax not understood
2430 '<span class="price">' +Syntax not understood
2431 price +Syntax not understood
2432 '</span>' +Syntax not understood
2434 (Syntax not understood
2435 mrpSyntax not understood
2436 ? '<span class="mrp">' +Syntax not understood
2437 mrp +Syntax not understood
2438 '</span>'Syntax not understood
2439 : ''Unknown directive
2440 ) +Syntax not understood
2442 '</div>' +Syntax not understood
2444 '<button ' +Syntax not understood
2445 'class="add-button" ' +Syntax not understood
2446 'onclick="event.stopPropagation(); addToCart(\'' +Syntax not understood
2447 encodeJS(product.id) +Syntax not understood
2448 '\', 1)">' +Syntax not understood
2449 'Add to Cart' +Syntax not understood
2450 '</button>' +Syntax not understood
2452 '</div>' +Syntax not understood
2454 '</article>'Syntax not understood
2456 );Syntax not understood
2458 }Syntax not understood
2459 ).join("");Syntax not understood
2461}Syntax not understood
2464documentSyntax not understood
2465 .getElementById(Syntax not understood
2466 "searchInput"Syntax not understood
2467 )Syntax not understood
2468 .addEventListener(Syntax not understood
2469 "input",Syntax not understood
2470 renderProductsSyntax not understood
2471 );Syntax not understood
2474function openProduct(id) {Syntax not understood
2476 const product =Syntax not understood
2477 products.find(Syntax not understood
2478 function (p) {Syntax not understood
2479 return p.id === id;Syntax not understood
2480 }Syntax not understood
2481 );Syntax not understood
2483 if (!product) return;Syntax not understood
2485 currentProduct =Syntax not understood
2486 product;Syntax not understood
2488 detailQuantity = 1;Syntax not understood
2490 const modal =Syntax not understood
2491 document.getElementById(Syntax not understood
2492 "detailModal"Syntax not understood
2493 );Syntax not understood
2495 const firstImage =Syntax not understood
2496 product.images[0];Syntax not understood
2498 const features =Syntax not understood
2499 product.keyFeaturesSyntax not understood
2500 ? product.keyFeaturesSyntax not understood
2501 : "Natural and carefully prepared.";Unknown directive
2503 modal.innerHTML =Syntax not understood
2505 '<div class="detail">' +Syntax not understood
2507 '<div class="detail-grid">' +Syntax not understood
2509 '<div>' +Syntax not understood
2511 '<img ' +Syntax not understood
2512 'id="detailMainImage" ' +Syntax not understood
2513 'class="detail-main-image" ' +Syntax not understood
2514 'src="' +Syntax not understood
2515 escapeClient(Syntax not understood
2516 firstImageSyntax not understood
2517 ) +Syntax not understood
2518 '" ' +Syntax not understood
2519 'alt="' +Syntax not understood
2520 escapeClient(Syntax not understood
2521 product.nameSyntax not understood
2522 ) +Syntax not understood
2523 '">' +Syntax not understood
2525 '<div class="gallery">' +Syntax not understood
2527 product.images.map(Syntax not understood
2528 function (Syntax not understood
2529 image,Syntax not understood
2530 indexSyntax not understood
2531 ) {Syntax not understood
2533 return (Syntax not understood
2534 '<img ' +Syntax not understood
2535 'src="' +Syntax not understood
2536 escapeClient(Syntax not understood
2537 imageSyntax not understood
2538 ) +Syntax not understood
2539 '" ' +Syntax not understood
2540 'alt="' +Syntax not understood
2541 escapeClient(Syntax not understood
2542 product.nameSyntax not understood
2543 ) +Syntax not understood
2544 '" ' +Syntax not understood
2545 'onclick="changeDetailImage(' +Syntax not understood
2546 index +Syntax not understood
2547 ')">'Syntax not understood
2548 );Syntax not understood
2550 }Syntax not understood
2551 ).join("") +Syntax not understood
2553 '</div>' +Syntax not understood
2555 '</div>' +Syntax not understood
2557 '<div>' +Syntax not understood
2559 '<div class="detail-category">' +Syntax not understood
2560 escapeClient(Syntax not understood
2561 product.categorySyntax not understood
2562 ) +Syntax not understood
2563 '</div>' +Syntax not understood
2565 '<h1 class="detail-title">' +Syntax not understood
2566 escapeClient(Syntax not understood
2567 product.nameSyntax not understood
2568 ) +Syntax not understood
2569 '</h1>' +Syntax not understood
2571 '<div>' +Syntax not understood
2573 '<span class="detail-price">' +Syntax not understood
2574 formatPrice(Syntax not understood
2575 product.sellingPriceSyntax not understood
2576 ) +Syntax not understood
2577 '</span>' +Syntax not understood
2579 (Syntax not understood
2580 product.mrpSyntax not understood
2581 ? '<span class="detail-mrp">' +Syntax not understood
2582 formatPrice(Syntax not understood
2583 product.mrpSyntax not understood
2584 ) +Syntax not understood
2585 '</span>'Syntax not understood
2586 : ''Unknown directive
2587 ) +Syntax not understood
2589 '</div>' +Syntax not understood
2591 (Syntax not understood
2592 product.weightSyntax not understood
2593 ? '<div class="detail-weight">' +Syntax not understood
2594 escapeClient(Syntax not understood
2595 product.weightSyntax not understood
2596 ) +Syntax not understood
2597 '</div>'Syntax not understood
2598 : ''Unknown directive
2599 ) +Syntax not understood
2601 '<div class="detail-section">' +Syntax not understood
2602 '<h3>Description</h3>' +Syntax not understood
2603 '<p>' +Syntax not understood
2604 escapeClient(Syntax not understood
2605 product.fullDescription ||Syntax not understood
2606 product.shortDescriptionSyntax not understood
2607 ) +Syntax not understood
2608 '</p>' +Syntax not understood
2609 '</div>' +Syntax not understood
2611 (Syntax not understood
2612 product.ingredientsSyntax not understood
2613 ? '<div class="detail-section">' +Syntax not understood
2614 '<h3>Ingredients</h3>' +Syntax not understood
2615 '<p>' +Syntax not understood
2616 escapeClient(Syntax not understood
2617 product.ingredientsSyntax not understood
2618 ) +Syntax not understood
2619 '</p>' +Syntax not understood
2620 '</div>'Syntax not understood
2621 : ''Unknown directive
2622 ) +Syntax not understood
2624 '<div class="detail-section">' +Syntax not understood
2625 '<h3>Key Features</h3>' +Syntax not understood
2626 '<p>' +Syntax not understood
2627 escapeClient(Syntax not understood
2628 featuresSyntax not understood
2629 ) +Syntax not understood
2630 '</p>' +Syntax not understood
2631 '</div>' +Syntax not understood
2633 '<div class="quantity">' +Syntax not understood
2635 '<button ' +Syntax not understood
2636 'class="qty-btn" ' +Syntax not understood
2637 'onclick="changeDetailQty(-1)">' +Syntax not understood
2638 '−' +Syntax not understood
2639 '</button>' +Syntax not understood
2641 '<span ' +Syntax not understood
2642 'class="qty-number" ' +Syntax not understood
2643 'id="detailQty">' +Syntax not understood
2644 '1' +Syntax not understood
2645 '</span>' +Syntax not understood
2647 '<button ' +Syntax not understood
2648 'class="qty-btn" ' +Syntax not understood
2649 'onclick="changeDetailQty(1)">' +Syntax not understood
2650 '+' +Syntax not understood
2651 '</button>' +Syntax not understood
2653 '</div>' +Syntax not understood
2655 '<button ' +Syntax not understood
2656 'class="detail-add" ' +Syntax not understood
2657 'id="detailAddButton" ' +Syntax not understood
2658 'onclick="addDetailToCart()">' +Syntax not understood
2659 'Add to Cart' +Syntax not understood
2660 '</button>' +Syntax not understood
2662 '</div>' +Syntax not understood
2664 '</div>' +Syntax not understood
2666 '</div>';Syntax not understood
2668 documentSyntax not understood
2669 .getElementById(Syntax not understood
2670 "detailOverlay"Syntax not understood
2671 )Syntax not understood
2672 .classList.add(Syntax not understood
2673 "show"Syntax not understood
2674 );Syntax not understood
2676 documentSyntax not understood
2677 .getElementById(Syntax not understood
2678 "detailModal"Syntax not understood
2679 )Syntax not understood
2680 .scrollTop = 0;Syntax not understood
2682}Syntax not understood
2685function changeDetailImage(index) {Syntax not understood
2687 if (!currentProduct) return;Syntax not understood
2689 const image =Syntax not understood
2690 currentProduct.images[Syntax not understood
2691 indexSyntax not understood
2692 ];Syntax not understood
2694 const main =Syntax not understood
2695 document.getElementById(Syntax not understood
2696 "detailMainImage"Syntax not understood
2697 );Syntax not understood
2699 if (main && image) {Syntax not understood
2701 main.src = image;Syntax not understood
2703 }Syntax not understood
2705}Syntax not understood
2708function changeDetailQty(amount) {Syntax not understood
2710 detailQuantity += amount;Syntax not understood
2712 if (detailQuantity < 1) {Syntax not understood
2713 detailQuantity = 1;Syntax not understood
2714 }Syntax not understood
2716 if (detailQuantity > 20) {Syntax not understood
2717 detailQuantity = 20;Syntax not understood
2718 }Syntax not understood
2720 const qty =Syntax not understood
2721 document.getElementById(Syntax not understood
2722 "detailQty"Syntax not understood
2723 );Syntax not understood
2725 if (qty) {Syntax not understood
2727 qty.textContent =Syntax not understood
2728 detailQuantity;Syntax not understood
2730 }Syntax not understood
2732}Syntax not understood
2735function addDetailToCart() {Syntax not understood
2737 if (!currentProduct) return;Syntax not understood
2739 addToCart(Syntax not understood
2740 currentProduct.id,Syntax not understood
2741 detailQuantitySyntax not understood
2742 );Syntax not understood
2744 const button =Syntax not understood
2745 document.getElementById(Syntax not understood
2746 "detailAddButton"Syntax not understood
2747 );Syntax not understood
2749 if (button) {Syntax not understood
2751 button.textContent =Syntax not understood
2752 "Added to Cart ✓";Syntax not understood
2754 setTimeout(Syntax not understood
2755 function () {Syntax not understood
2757 if (button) {Syntax not understood
2759 button.textContent =Syntax not understood
2760 "Add to Cart";Syntax not understood
2762 }Syntax not understood
2764 },Syntax not understood
2765 1200Syntax not understood
2766 );Syntax not understood
2768 }Syntax not understood
2770}Syntax not understood
2773function closeDetail() {Syntax not understood
2775 documentSyntax not understood
2776 .getElementById(Syntax not understood
2777 "detailOverlay"Syntax not understood
2778 )Syntax not understood
2779 .classList.remove(Syntax not understood
2780 "show"Syntax not understood
2781 );Syntax not understood
2783}Syntax not understood
2786function closeDetailOutside(event) {Syntax not understood
2788 if (Syntax not understood
2789 event.target.id ===Syntax not understood
2790 "detailOverlay"Syntax not understood
2791 ) {Syntax not understood
2793 closeDetail();Syntax not understood
2795 }Syntax not understood
2797}Syntax not understood
2800function addToCart(Syntax not understood
2801 id,Syntax not understood
2802 quantitySyntax not understood
2803) {Syntax not understood
2805 const product =Syntax not understood
2806 products.find(Syntax not understood
2807 function (p) {Syntax not understood
2808 return p.id === id;Syntax not understood
2809 }Syntax not understood
2810 );Syntax not understood
2812 if (!product) return;Syntax not understood
2814 const existing =Syntax not understood
2815 cart.find(Syntax not understood
2816 function (item) {Syntax not understood
2817 return item.id === id;Syntax not understood
2818 }Syntax not understood
2819 );Syntax not understood
2821 if (existing) {Syntax not understood
2823 existing.quantity +=Syntax not understood
2824 quantity;Syntax not understood
2826 } else {Syntax not understood
2828 cart.push({Syntax not understood
2829 id: id,Unknown directive
2830 quantity: quantityUnknown directive
2831 });Syntax not understood
2833 }Syntax not understood
2835 saveCart();Syntax not understood
2837 updateCart();Syntax not understood
2839}Syntax not understood
2842function saveCart() {Syntax not understood
2844 localStorage.setItem(Syntax not understood
2845 "dhiveen_cart",Syntax not understood
2846 JSON.stringify(cart)Syntax not understood
2847 );Syntax not understood
2849}Syntax not understood
2852function updateCart() {Syntax not understood
2854 const count =Syntax not understood
2855 cart.reduce(Syntax not understood
2856 function (Syntax not understood
2857 total,Syntax not understood
2858 itemSyntax not understood
2859 ) {Syntax not understood
2861 return (Syntax not understood
2862 total +Syntax not understood
2863 item.quantitySyntax not understood
2864 );Syntax not understood
2866 },Syntax not understood
2867 0Syntax not understood
2868 );Syntax not understood
2870 documentSyntax not understood
2871 .getElementById(Syntax not understood
2872 "cartCount"Syntax not understood
2873 )Syntax not understood
2874 .textContent =Syntax not understood
2875 count;Syntax not understood
2877 renderCart();Syntax not understood
2879}Syntax not understood
2882function renderCart() {Syntax not understood
2884 const box =Syntax not understood
2885 document.getElementById(Syntax not understood
2886 "cartItems"Syntax not understood
2887 );Syntax not understood
2889 if (!cart.length) {Syntax not understood
2891 box.innerHTML =Syntax not understood
2892 '<div class="empty">' +Syntax not understood
2893 'Your cart is empty.' +Syntax not understood
2894 '<br><br>' +Syntax not understood
2895 'Add some products to continue.' +Syntax not understood
2896 '</div>';Syntax not understood
2898 documentSyntax not understood
2899 .getElementById(Syntax not understood
2900 "cartTotal"Syntax not understood
2901 )Syntax not understood
2902 .textContent =Syntax not understood
2903 "₹0";Syntax not understood
2905 return;Syntax not understood
2907 }Syntax not understood
2909 let total = 0;Syntax not understood
2911 box.innerHTML =Syntax not understood
2912 cart.map(Syntax not understood
2913 function (item) {Syntax not understood
2915 const product =Syntax not understood
2916 products.find(Syntax not understood
2917 function (p) {Syntax not understood
2918 return p.id === item.id;Syntax not understood
2919 }Syntax not understood
2920 );Syntax not understood
2922 if (!product) return "";Syntax not understood
2924 const price =Syntax not understood
2925 numberPrice(Syntax not understood
2926 product.sellingPriceSyntax not understood
2927 );Syntax not understood
2929 total +=Syntax not understood
2930 price *Syntax not understood
2931 item.quantity;Syntax not understood
2933 return (Syntax not understood
2935 '<div class="cart-item">' +Syntax not understood
2937 '<img ' +Syntax not understood
2938 'src="' +Syntax not understood
2939 escapeClient(Syntax not understood
2940 product.images[0]Syntax not understood
2941 ) +Syntax not understood
2942 '" ' +Syntax not understood
2943 'alt="' +Syntax not understood
2944 escapeClient(Syntax not understood
2945 product.nameSyntax not understood
2946 ) +Syntax not understood
2947 '">' +Syntax not understood
2949 '<div class="cart-info">' +Syntax not understood
2951 '<h4>' +Syntax not understood
2952 escapeClient(Syntax not understood
2953 product.nameSyntax not understood
2954 ) +Syntax not understood
2955 '</h4>' +Syntax not understood
2957 '<p>' +Syntax not understood
2958 formatPrice(price) +Syntax not understood
2959 ' × ' +Syntax not understood
2960 item.quantity +Syntax not understood
2961 '</p>' +Syntax not understood
2963 '<div class="cart-qty">' +Syntax not understood
2965 '<button ' +Syntax not understood
2966 'onclick="changeCartQty(\'' +Syntax not understood
2967 encodeJS(item.id) +Syntax not understood
2968 '\', -1)">' +Syntax not understood
2969 '−' +Syntax not understood
2970 '</button>' +Syntax not understood
2972 '<span>' +Syntax not understood
2973 item.quantity +Syntax not understood
2974 '</span>' +Syntax not understood
2976 '<button ' +Syntax not understood
2977 'onclick="changeCartQty(\'' +Syntax not understood
2978 encodeJS(item.id) +Syntax not understood
2979 '\', 1)">' +Syntax not understood
2980 '+' +Syntax not understood
2981 '</button>' +Syntax not understood
2983 '</div>' +Syntax not understood
2985 '</div>' +Syntax not understood
2987 '</div>'Syntax not understood
2989 );Syntax not understood
2991 }Syntax not understood
2992 ).join("");Syntax not understood
2994 documentSyntax not understood
2995 .getElementById(Syntax not understood
2996 "cartTotal"Syntax not understood
2997 )Syntax not understood
2998 .textContent =Syntax not understood
2999 formatPrice(total);Syntax not understood
3001}Syntax not understood
3004function changeCartQty(Syntax not understood
3005 id,Syntax not understood
3006 amountSyntax not understood
3007) {Syntax not understood
3009 const item =Syntax not understood
3010 cart.find(Syntax not understood
3011 function (i) {Syntax not understood
3012 return i.id === id;Syntax not understood
3013 }Syntax not understood
3014 );Syntax not understood
3016 if (!item) return;Syntax not understood
3018 item.quantity += amount;Syntax not understood
3020 if (Syntax not understood
3021 item.quantity <= 0Syntax not understood
3022 ) {Syntax not understood
3024 cart =Syntax not understood
3025 cart.filter(Syntax not understood
3026 function (i) {Syntax not understood
3027 return i.id !== id;Syntax not understood
3028 }Syntax not understood
3029 );Syntax not understood
3031 }Syntax not understood
3033 saveCart();Syntax not understood
3035 updateCart();Syntax not understood
3037}Syntax not understood
3040function openCart() {Syntax not understood
3042 documentSyntax not understood
3043 .getElementById(Syntax not understood
3044 "cartDrawer"Syntax not understood
3045 )Syntax not understood
3046 .classList.add(Syntax not understood
3047 "open"Syntax not understood
3048 );Syntax not understood
3050}Syntax not understood
3053function closeCart() {Syntax not understood
3055 documentSyntax not understood
3056 .getElementById(Syntax not understood
3057 "cartDrawer"Syntax not understood
3058 )Syntax not understood
3059 .classList.remove(Syntax not understood
3060 "open"Syntax not understood
3061 );Syntax not understood
3063}Syntax not understood
3066let currentCustomer = null;Syntax not understood
3067let customerAccountLoaded = false;Syntax not understood
3069function getCustomerProfile() {Syntax not understood
3070 return currentCustomer;Syntax not understood
3071}Syntax not understood
3073function getLoggedInCustomer() {Syntax not understood
3074 return currentCustomer;Syntax not understood
3075}Syntax not understood
3077async function loadCustomerAccount() {Syntax not understood
3078 try {Syntax not understood
3079 const response = await fetch("/api/customer/me", {Syntax not understood
3080 method: "GET",Unknown directive
3081 credentials: "same-origin",Unknown directive
3082 cache: "no-store"Unknown directive
3083 });Syntax not understood
3085 if (!response.ok) {Syntax not understood
3086 currentCustomer = null;Syntax not understood
3087 return null;Syntax not understood
3088 }Syntax not understood
3090 const data = await response.json();Syntax not understood
3091 currentCustomer = data.success && data.customer ? data.customer : null;Unknown directive
3092 return currentCustomer;Syntax not understood
3093 } catch (error) {Syntax not understood
3094 currentCustomer = null;Syntax not understood
3095 return null;Syntax not understood
3096 } finally {Syntax not understood
3097 customerAccountLoaded = true;Syntax not understood
3098 }Syntax not understood
3099}Syntax not understood
3101function openAccount() {Syntax not understood
3102 document.getElementById("accountOverlay").classList.add("show");Syntax not understood
3103 document.getElementById("accountContent").innerHTML =Syntax not understood
3104 '<button class="account-close" onclick="closeAccount()">×</button>' +Syntax not understood
3105 '<h2>My Account</h2>' +Syntax not understood
3106 '<p>Loading account...</p>';Syntax not understood
3107 loadCustomerAccount().then(function () {Syntax not understood
3108 renderAccount();Syntax not understood
3109 });Syntax not understood
3110}Syntax not understood
3112function closeAccount() {Syntax not understood
3113 document.getElementById("accountOverlay").classList.remove("show");Syntax not understood
3114}Syntax not understood
3116function renderAccount() {Syntax not understood
3117 const box = document.getElementById("accountContent");Syntax not understood
3118 const profile = currentCustomer;Syntax not understood
3120 if (profile) {Syntax not understood
3121 const complete = !!(Syntax not understood
3122 profile.name && profile.mobile && profile.address &&Syntax not understood
3123 profile.city && profile.state && profile.pincodeSyntax not understood
3124 );Syntax not understood
3126 box.innerHTML =Syntax not understood
3127 '<button class="account-close" onclick="closeAccount()">×</button>' +Syntax not understood
3128 '<h2>My Account</h2>' +Syntax not understood
3129 '<p>Welcome, ' + escapeClient(profile.name || "Customer") + ' 👋</p>' +Syntax not understood
3130 '<div class="account-profile">' +Syntax not understood
3131 '<strong>Email:</strong> ' + escapeClient(profile.email || "") + '<br>' +Unknown directive
3132 '<strong>Mobile:</strong> ' + escapeClient(profile.mobile || "Not added") + '<br>' +Unknown directive
3133 '<strong>Address:</strong> ' + escapeClient(profile.address || "Not added") + '<br>' +Unknown directive
3134 '<strong>City:</strong> ' + escapeClient(profile.city || "Not added") + '<br>' +Unknown directive
3135 '<strong>State:</strong> ' + escapeClient(profile.state || "Not added") + '<br>' +Unknown directive
3136 '<strong>Pincode:</strong> ' + escapeClient(profile.pincode || "Not added") +Unknown directive
3137 '</div>' +Syntax not understood
3138 (!complete ? '<p class="account-note">Complete your profile once. Your details will be available automatically at checkout.</p>' : '') +Unknown directive
3139 '<div class="account-actions">' +Syntax not understood
3140 '<button class="account-secondary" onclick="showEditProfile()">' +Syntax not understood
3141 (complete ? 'Edit Profile' : 'Complete Profile') +Unknown directive
3142 '</button>' +Syntax not understood
3143 '<button class="account-danger" onclick="customerLogout()">Logout</button>' +Syntax not understood
3144 '<button class="account-secondary" onclick="closeAccount()">Close</button>' +Syntax not understood
3145 '</div>';Syntax not understood
3146 return;Syntax not understood
3147 }Syntax not understood
3149 box.innerHTML =Syntax not understood
3150 '<button class="account-close" onclick="closeAccount()">×</button>' +Syntax not understood
3151 '<h2>My Account</h2>' +Syntax not understood
3152 '<p>Login securely with your email. No password needed.</p>' +Syntax not understood
3153 '<div class="form-group"><label>Email Address</label>' +Syntax not understood
3154 '<input id="accountEmail" type="email" placeholder="you@example.com" autocomplete="email"></div>' +Syntax not understood
3155 '<div id="otpArea"></div>' +Syntax not understood
3156 '<div class="account-actions" id="otpActions">' +Syntax not understood
3157 '<button class="account-primary" id="sendOtpButton" onclick="sendCustomerOtp()">Send OTP</button>' +Syntax not understood
3158 '<button class="account-secondary" onclick="closeAccount()">Close</button>' +Syntax not understood
3159 '</div>' +Syntax not understood
3160 '<p class="account-note">A 6-digit OTP will be sent to your email. OTP expires in 5 minutes.</p>';Syntax not understood
3161}Syntax not understood
3163async function sendCustomerOtp() {Syntax not understood
3164 const emailInput = document.getElementById("accountEmail");Syntax not understood
3165 const button = document.getElementById("sendOtpButton");Syntax not understood
3166 if (!emailInput || !button) return;Syntax not understood
3168 const email = emailInput.value.trim().toLowerCase();Syntax not understood
3169 if (!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(email)) {Syntax not understood
3170 alert("Please enter a valid email address.");Syntax not understood
3171 return;Syntax not understood
3172 }Syntax not understood
3174 button.disabled = true;Syntax not understood
3175 button.textContent = "Sending...";Syntax not understood
3177 try {Syntax not understood
3178 const response = await fetch("/api/customer/send-otp", {Syntax not understood
3179 method: "POST",Unknown directive
3180 headers: { "content-type": "application/json" },Unknown directive
3181 credentials: "same-origin",Unknown directive
3182 body: JSON.stringify({ email: email })Unknown directive
3183 });Syntax not understood
3185 const data = await response.json();Syntax not understood
3186 if (!response.ok || !data.success) {Syntax not understood
3187 throw new Error(data.message || "Unable to send OTP.");Syntax not understood
3188 }Syntax not understood
3190 document.getElementById("otpArea").innerHTML =Syntax not understood
3191 '<div class="form-group"><label>6 Digit OTP</label>' +Syntax not understood
3192 '<input id="accountOtp" type="text" inputmode="numeric" maxlength="6" placeholder="Enter OTP" autocomplete="one-time-code"></div>' +Syntax not understood
3193 '<p class="account-note">OTP sent to <strong>' + escapeClient(email) + '</strong>. Check Inbox / Spam.</p>';Syntax not understood
3195 document.getElementById("otpActions").innerHTML =Syntax not understood
3196 '<button class="account-primary" id="verifyOtpButton" onclick="verifyCustomerOtp()">Verify OTP</button>' +Syntax not understood
3197 '<button class="account-secondary" id="resendOtpButton" onclick="sendCustomerOtp()">Resend OTP</button>' +Syntax not understood
3198 '<button class="account-secondary" onclick="renderAccount()">Change Email</button>';Syntax not understood
3200 const otpInput = document.getElementById("accountOtp");Syntax not understood
3201 if (otpInput) otpInput.focus();Syntax not understood
3202 } catch (error) {Syntax not understood
3203 alert(error.message || "Unable to send OTP.");Syntax not understood
3204 button.disabled = false;Syntax not understood
3205 button.textContent = "Send OTP";Syntax not understood
3206 }Syntax not understood
3207}Syntax not understood
3209async function verifyCustomerOtp() {Syntax not understood
3210 const emailInput = document.getElementById("accountEmail");Syntax not understood
3211 const otpInput = document.getElementById("accountOtp");Syntax not understood
3212 const button = document.getElementById("verifyOtpButton");Syntax not understood
3213 if (!emailInput || !otpInput || !button) return;Syntax not understood
3215 const email = emailInput.value.trim().toLowerCase();Syntax not understood
3216 const otp = otpInput.value.trim();Syntax not understood
3218 if (!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(email)) {Syntax not understood
3219 alert("Please enter a valid email address.");Syntax not understood
3220 return;Syntax not understood
3221 }Syntax not understood
3222 if (!/^\d{6}$/.test(otp)) {Syntax not understood
3223 alert("Please enter the 6 digit OTP.");Syntax not understood
3224 return;Syntax not understood
3225 }Syntax not understood
3227 button.disabled = true;Syntax not understood
3228 button.textContent = "Verifying...";Syntax not understood
3230 try {Syntax not understood
3231 const response = await fetch("/api/customer/verify-otp", {Syntax not understood
3232 method: "POST",Unknown directive
3233 headers: { "content-type": "application/json" },Unknown directive
3234 credentials: "same-origin",Unknown directive
3235 body: JSON.stringify({ email: email, otp: otp })Unknown directive
3236 });Syntax not understood
3238 const data = await response.json();Syntax not understood
3239 if (!response.ok || !data.success) {Syntax not understood
3240 throw new Error(data.message || "Invalid or expired OTP.");Syntax not understood
3241 }Syntax not understood
3243 currentCustomer = data.customer || null;Syntax not understood
3244 customerAccountLoaded = true;Syntax not understood
3245 renderAccount();Syntax not understood
3246 fillCheckoutFromProfile();Syntax not understood
3248 if (currentCustomer && currentCustomer.name && currentCustomer.mobile && currentCustomer.address && currentCustomer.city && currentCustomer.state && currentCustomer.pincode) {Syntax not understood
3249 alert("Login successful. Welcome to DHIVEEN NATURAL!");Syntax not understood
3250 } else {Syntax not understood
3251 showEditProfile();Syntax not understood
3252 }Syntax not understood
3253 } catch (error) {Syntax not understood
3254 alert(error.message || "Unable to verify OTP.");Syntax not understood
3255 button.disabled = false;Syntax not understood
3256 button.textContent = "Verify OTP";Syntax not understood
3257 }Syntax not understood
3258}Syntax not understood
3260function showCreateProfile(existing) {Syntax not understood
3261 showEditProfile(existing || currentCustomer || {});Syntax not understood
3262}Syntax not understood
3264function showEditProfile(existing) {Syntax not understood
3265 const profile = existing || currentCustomer || {};Syntax not understood
3266 const box = document.getElementById("accountContent");Syntax not understood
3268 box.innerHTML =Syntax not understood
3269 '<button class="account-close" onclick="closeAccount()">×</button>' +Syntax not understood
3270 '<h2>Complete Your Profile</h2>' +Syntax not understood
3271 '<p>Your email is verified. Add your delivery details once.</p>' +Syntax not understood
3272 '<div class="form-group"><label>Email Address</label><input type="email" value="' + escapeClient(profile.email || "") + '" disabled></div>' +Syntax not understood
3273 '<div class="form-group"><label>Full Name</label><input id="profileName" type="text" value="' + escapeClient(profile.name || "") + '" placeholder="Enter your name" autocomplete="name"></div>' +Syntax not understood
3274 '<div class="form-group"><label>Mobile Number</label><input id="profileMobile" type="tel" maxlength="10" value="' + escapeClient(profile.mobile || "") + '" placeholder="10 digit mobile number" autocomplete="tel"></div>' +Syntax not understood
3275 '<div class="form-group"><label>Full Address</label><textarea id="profileAddress" placeholder="House / Street / Area" autocomplete="street-address">' + escapeClient(profile.address || "") + '</textarea></div>' +Syntax not understood
3276 '<div class="form-group"><label>City</label><input id="profileCity" type="text" value="' + escapeClient(profile.city || "") + '" placeholder="City" autocomplete="address-level2"></div>' +Syntax not understood
3277 '<div class="form-group"><label>State</label><input id="profileState" type="text" value="' + escapeClient(profile.state || "Tamil Nadu") + '" autocomplete="address-level1"></div>' +Syntax not understood
3278 '<div class="form-group"><label>Pincode</label><input id="profilePincode" type="text" maxlength="6" value="' + escapeClient(profile.pincode || "") + '" placeholder="6 digit pincode" autocomplete="postal-code"></div>' +Syntax not understood
3279 '<div class="account-actions">' +Syntax not understood
3280 '<button class="account-primary" id="saveProfileButton" onclick="saveCustomerProfile()">Save Profile</button>' +Syntax not understood
3281 '<button class="account-secondary" onclick="renderAccount()">Back</button>' +Syntax not understood
3282 '</div>' +Syntax not understood
3283 '<p class="account-note">Your profile is stored securely in the DHIVEEN NATURAL customer database.</p>';Syntax not understood
3284}Syntax not understood
3286async function saveCustomerProfile() {Syntax not understood
3287 const name = document.getElementById("profileName").value.trim();Syntax not understood
3288 const mobile = document.getElementById("profileMobile").value.trim();Syntax not understood
3289 const address = document.getElementById("profileAddress").value.trim();Syntax not understood
3290 const city = document.getElementById("profileCity").value.trim();Syntax not understood
3291 const state = document.getElementById("profileState").value.trim();Syntax not understood
3292 const pincode = document.getElementById("profilePincode").value.trim();Syntax not understood
3293 const button = document.getElementById("saveProfileButton");Syntax not understood
3295 if (!name) return alert("Please enter your name.");Syntax not understood
3296 if (!/^[6-9][0-9]{9}$/.test(mobile)) return alert("Please enter a valid Indian 10 digit mobile number.");Syntax not understood
3297 if (!address) return alert("Please enter your address.");Syntax not understood
3298 if (!city) return alert("Please enter your city.");Syntax not understood
3299 if (!state) return alert("Please enter your state.");Syntax not understood
3300 if (!/^[0-9]{6}$/.test(pincode)) return alert("Please enter a valid 6 digit pincode.");Syntax not understood
3302 if (button) {Syntax not understood
3303 button.disabled = true;Syntax not understood
3304 button.textContent = "Saving...";Syntax not understood
3305 }Syntax not understood
3307 try {Syntax not understood
3308 const response = await fetch("/api/customer/profile", {Syntax not understood
3309 method: "POST",Unknown directive
3310 headers: { "content-type": "application/json" },Unknown directive
3311 credentials: "same-origin",Unknown directive
3312 body: JSON.stringify({ name, mobile, address, city, state, pincode })Unknown directive
3313 });Syntax not understood
3315 const data = await response.json();Syntax not understood
3316 if (!response.ok || !data.success) {Syntax not understood
3317 throw new Error(data.message || "Unable to save profile.");Syntax not understood
3318 }Syntax not understood
3320 currentCustomer = data.customer || currentCustomer;Syntax not understood
3321 alert("Profile saved successfully.");Syntax not understood
3322 renderAccount();Syntax not understood
3323 fillCheckoutFromProfile();Syntax not understood
3324 } catch (error) {Syntax not understood
3325 alert(error.message || "Unable to save profile.");Syntax not understood
3326 if (button) {Syntax not understood
3327 button.disabled = false;Syntax not understood
3328 button.textContent = "Save Profile";Syntax not understood
3329 }Syntax not understood
3330 }Syntax not understood
3331}Syntax not understood
3333async function customerLogout() {Syntax not understood
3334 try {Syntax not understood
3335 await fetch("/api/customer/logout", {Syntax not understood
3336 method: "POST",Unknown directive
3337 credentials: "same-origin"Unknown directive
3338 });Syntax not understood
3339 } catch (error) {}Syntax not understood
3341 currentCustomer = null;Syntax not understood
3342 closeAccount();Syntax not understood
3343}Syntax not understood
3345function fillCheckoutFromProfile() {Syntax not understood
3346 const profile = getLoggedInCustomer();Syntax not understood
3347 if (!profile) return;Syntax not understood
3349 const map = {Syntax not understood
3350 customerEmail: profile.email,Unknown directive
3351 customerName: profile.name,Unknown directive
3352 customerMobile: profile.mobile,Unknown directive
3353 customerStreet: profile.address,Unknown directive
3354 customerCity: profile.city,Unknown directive
3355 customerState: profile.state,Unknown directive
3356 customerPincode: profile.pincodeUnknown directive
3357 };Syntax not understood
3359 Object.keys(map).forEach(function (id) {Syntax not understood
3360 const el = document.getElementById(id);Syntax not understood
3361 if (el && map[id] !== undefined) el.value = map[id];Syntax not understood
3362 });Syntax not understood
3363}Syntax not understood
3365async function saveCheckoutDetailsForProfile(details) {Syntax not understood
3366 if (!currentCustomer) return;Syntax not understood
3368 try {Syntax not understood
3369 const response = await fetch("/api/customer/profile", {Syntax not understood
3370 method: "POST",Unknown directive
3371 headers: { "content-type": "application/json" },Unknown directive
3372 credentials: "same-origin",Unknown directive
3373 body: JSON.stringify({Unknown directive
3374 name: details.name,Unknown directive
3375 mobile: details.mobile,Unknown directive
3376 address: details.address,Unknown directive
3377 city: details.city,Unknown directive
3378 state: details.state,Unknown directive
3379 pincode: details.pincodeUnknown directive
3380 })Syntax not understood
3381 });Syntax not understood
3383 if (response.ok) {Syntax not understood
3384 const data = await response.json();Syntax not understood
3385 if (data.success && data.customer) currentCustomer = data.customer;Syntax not understood
3386 }Syntax not understood
3387 } catch (error) {Syntax not understood
3388 console.warn("Could not update customer profile from checkout:", error);Unknown directive
3389 }Syntax not understood
3390}Syntax not understood
3392function openTracking() {Syntax not understood
3393 document.getElementById("trackingOverlay").classList.add("show");Syntax not understood
3394 document.getElementById("trackingResult").innerHTML = "";Syntax not understood
3395}Syntax not understood
3397function closeTracking() {Syntax not understood
3398 document.getElementById("trackingOverlay").classList.remove("show");Syntax not understood
3399}Syntax not understood
3401async function trackOrder() {Syntax not understood
3402 const orderId = document.getElementById("trackingOrderId").value.trim();Syntax not understood
3403 const mobile = document.getElementById("trackingMobile").value.trim();Syntax not understood
3404 const resultBox = document.getElementById("trackingResult");Syntax not understood
3405 const button = document.getElementById("trackOrderButton");Syntax not understood
3407 if (!orderId) {Syntax not understood
3408 alert("Please enter your Order ID.");Syntax not understood
3409 return;Syntax not understood
3410 }Syntax not understood
3412 if (!/^[0-9]{10}$/.test(mobile)) {Syntax not understood
3413 alert("Please enter a valid 10 digit mobile number.");Syntax not understood
3414 return;Syntax not understood
3415 }Syntax not understood
3417 button.disabled = true;Syntax not understood
3418 button.textContent = "Checking...";Syntax not understood
3419 resultBox.innerHTML = "";Syntax not understood
3421 try {Syntax not understood
3422 const response = await fetch(Syntax not understood
3423 "/api/track-order?orderId=" +Syntax not understood
3424 encodeURIComponent(orderId) +Syntax not understood
3425 "&mobile=" +Syntax not understood
3426 encodeURIComponent(mobile),Syntax not understood
3427 { method: "GET", cache: "no-store" }Unknown directive
3428 );Syntax not understood
3430 const data = await response.json();Syntax not understood
3432 if (!response.ok || !data.success) {Syntax not understood
3433 throw new Error(Syntax not understood
3434 data.message || data.error || "Order not found."Syntax not understood
3435 );Syntax not understood
3436 }Syntax not understood
3438 const awb =Syntax not understood
3439 data.awbSyntax not understood
3440 ? String(data.awb)Syntax not understood
3441 : "";Unknown directive
3443 const liveTracking =Syntax not understood
3444 data.delhiveryTracking || null;Syntax not understood
3446 const displayStatus =Syntax not understood
3447 String(data.status || "").toLowerCase() === "cancelled"Syntax not understood
3448 ? "Cancelled"Syntax not understood
3449 : (data.liveStatus || data.status || "Order Placed");Unknown directive
3451 let trackingHtml =Syntax not understood
3452 '<div class="tracking-result">' +Syntax not understood
3453 '<div><strong>Order ID:</strong> ' +Unknown directive
3454 escapeClient(data.orderId) + '</div>' +Syntax not understood
3455 '<div><strong>Order Date:</strong> ' +Unknown directive
3456 escapeClient(String(data.orderDate || "")) + '</div>' +Syntax not understood
3457 '<div><strong>Total:</strong> ' +Unknown directive
3458 formatPrice(data.total) + '</div>' +Syntax not understood
3459 '<div><strong>Payment:</strong> ' +Unknown directive
3460 escapeClient(String(data.paymentMethod || "")) + '</div>';Syntax not understood
3462 if (awb) {Syntax not understood
3463 trackingHtml +=Syntax not understood
3464 '<div><strong>AWB:</strong> ' +Unknown directive
3465 escapeClient(awb) +Syntax not understood
3466 '</div>';Syntax not understood
3467 } else {Syntax not understood
3468 trackingHtml +=Syntax not understood
3469 '<div><strong>AWB:</strong> Not added yet</div>';Unknown directive
3470 }Syntax not understood
3472 trackingHtml +=Syntax not understood
3473 '<div class="tracking-status">' +Syntax not understood
3474 escapeClient(String(displayStatus)) +Syntax not understood
3475 '</div>';Syntax not understood
3477 if (Syntax not understood
3478 liveTracking &&Syntax not understood
3479 liveTracking.foundSyntax not understood
3480 ) {Syntax not understood
3481 if (liveTracking.expectedDelivery) {Syntax not understood
3482 trackingHtml +=Syntax not understood
3483 '<div style="margin-top:8px;"><strong>Expected Delivery:</strong> ' +Unknown directive
3484 escapeClient(Syntax not understood
3485 String(Syntax not understood
3486 liveTracking.expectedDeliverySyntax not understood
3487 )Syntax not understood
3488 ) +Syntax not understood
3489 '</div>';Syntax not understood
3490 }Syntax not understood
3492 if (Array.isArray(liveTracking.scans) &&Syntax not understood
3493 liveTracking.scans.length) {Syntax not understood
3494 trackingHtml +=Syntax not understood
3495 '<div style="margin-top:14px;"><strong>Latest Updates</strong></div>';Unknown directive
3497 trackingHtml +=Syntax not understood
3498 liveTracking.scans.map(function (scan) {Syntax not understood
3499 return (Syntax not understood
3500 '<div style="margin-top:8px;padding:8px 0;border-bottom:1px solid rgba(215,177,70,.12);">' +Unknown directive
3501 '<strong>' +Syntax not understood
3502 escapeClient(String(scan.status || "")) +Syntax not understood
3503 '</strong>' +Syntax not understood
3504 (scan.locationSyntax not understood
3505 ? ' — ' + escapeClient(String(scan.location))Syntax not understood
3506 : '') +Unknown directive
3507 (scan.dateTimeSyntax not understood
3508 ? '<br><small>' +Syntax not understood
3509 escapeClient(String(scan.dateTime)) +Syntax not understood
3510 '</small>'Syntax not understood
3511 : '') +Unknown directive
3512 '</div>'Syntax not understood
3513 );Syntax not understood
3514 }).join("");Syntax not understood
3515 }Syntax not understood
3516 } else if (awb && data.trackingError) {Syntax not understood
3517 trackingHtml +=Syntax not understood
3518 '<div style="margin-top:10px;">' +Unknown directive
3519 escapeClient(String(data.trackingError)) +Syntax not understood
3520 '</div>';Syntax not understood
3521 }Syntax not understood
3523 trackingHtml += '</div>';Syntax not understood
3525 resultBox.innerHTML = trackingHtml;Syntax not understood
3526 } catch (error) {Syntax not understood
3527 resultBox.innerHTML =Syntax not understood
3528 '<div class="tracking-result">' +Syntax not understood
3529 escapeClient(error.message) +Syntax not understood
3530 '</div>';Syntax not understood
3531 } finally {Syntax not understood
3532 button.disabled = false;Syntax not understood
3533 button.textContent = "Track Order";Syntax not understood
3534 }Syntax not understood
3535}Syntax not understood
3539function openCheckout() {Syntax not understood
3541 if (!cart.length) {Syntax not understood
3543 alert(Syntax not understood
3544 "Your cart is empty."Syntax not understood
3545 );Syntax not understood
3547 return;Syntax not understood
3549 }Syntax not understood
3551 closeCart();Syntax not understood
3553 // Always build the current address-aware checkout before showing it.Syntax not understood
3554 // The static HTML is a legacy fallback and must not be the active form.Syntax not understood
3555 resetCheckout();Syntax not understood
3557 delhiveryShippingQuote = null;Syntax not understood
3558 delhiveryQuoteRequestId++;Syntax not understood
3559 prepaidDiscountPercentForCheckout = null;Syntax not understood
3561 renderCheckoutSummary();Syntax not understood
3563 documentSyntax not understood
3564 .getElementById(Syntax not understood
3565 "checkoutOverlay"Syntax not understood
3566 )Syntax not understood
3567 .classList.add(Syntax not understood
3568 "show"Syntax not understood
3569 );Syntax not understood
3571 setTimeout(fillCheckoutFromProfile, 0);Syntax not understood
3573}Syntax not understood
3576function renderCheckoutSummary() {Syntax not understood
3578 let total = 0;Syntax not understood
3580 const lines = cart.map(function(item) {Syntax not understood
3581 const product = products.find(function(p) { return p.id === item.id; });Syntax not understood
3582 if (!product) return "";Syntax not understood
3584 const price = numberPrice(product.sellingPrice);Syntax not understood
3585 const subtotal = price * item.quantity;Syntax not understood
3586 total += subtotal;Syntax not understood
3588 return (Syntax not understood
3589 escapeClient(product.name) +Syntax not understood
3590 " × " + item.quantity +Syntax not understood
3591 " — " + formatPrice(subtotal)Syntax not understood
3592 );Syntax not understood
3593 }).filter(Boolean);Syntax not understood
3595 const shipping = delhiveryShippingQuoteSyntax not understood
3596 ? numberPrice(delhiveryShippingQuote.customerShipping)Syntax not understood
3597 : 0;Unknown directive
3599 const payment = document.querySelector('input[name="payment"]:checked');Unknown directive
3600 const isPrepaid = payment && payment.value === "UPI";Syntax not understood
3601 const isCOD = payment && payment.value === "COD";Syntax not understood
3602 const prepaidDiscount = isPrepaid ? getPrepaidDiscount(total) : 0;Unknown directive
3603 const codCharge = delhiveryShippingQuote && isCODSyntax not understood
3604 ? numberPrice(delhiveryShippingQuote.codCharge)Syntax not understood
3605 : 0;Unknown directive
3606 const productPayable = Math.max(0, total - prepaidDiscount);Syntax not understood
3607 const grandTotal = productPayable + shipping + codCharge;Syntax not understood
3608 const quoteReady = !!delhiveryShippingQuote;Syntax not understood
3609 const pincode = document.getElementById("customerPincode")Syntax not understood
3610 ? document.getElementById("customerPincode").value.trim()Syntax not understood
3611 : "";Unknown directive
3613 const shippingLine = quoteReadySyntax not understood
3614 ? '<div style="margin-top:8px;display:flex;justify-content:space-between;gap:12px;">' +Unknown directive
3615 '<span>Shipping (70%)</span><strong>' + formatPrice(shipping) + '</strong></div>'Syntax not understood
3616 : '<div style="margin-top:8px;color:#777;">Enter your 6 digit pincode to calculate delivery charge.</div>';Unknown directive
3618 const discountLine = prepaidDiscount > 0Syntax not understood
3619 ? '<div style="margin-top:8px;display:flex;justify-content:space-between;gap:12px;color:#1e6a2c;">' +Unknown directive
3620 '<span>Prepaid Discount</span><strong>- ' + formatPrice(prepaidDiscount) + '</strong></div>'Syntax not understood
3621 : '';Unknown directive
3623 const codLine = quoteReady && codCharge > 0Syntax not understood
3624 ? '<div style="margin-top:8px;display:flex;justify-content:space-between;gap:12px;">' +Unknown directive
3625 '<span>COD Charge</span><strong>' + formatPrice(codCharge) + '</strong></div>'Syntax not understood
3626 : '';Unknown directive
3628 const codAdvance = isCODSyntax not understood
3629 ? Math.round(grandTotal * COD_CONFIRMATION_PERCENT / 100 * 100) / 100Syntax not understood
3630 : 0;Unknown directive
3631 const codBalance = isCODSyntax not understood
3632 ? Math.max(0, Math.round((grandTotal - codAdvance) * 100) / 100)Syntax not understood
3633 : 0;Unknown directive
3635 const codConfirmLine = isCODSyntax not understood
3636 ? '<div style="margin-top:12px;padding:10px;border-radius:10px;background:#fff9d8;border:1px solid #e7d56b;">' +Unknown directive
3637 '<strong>COD Advance:</strong> Pay ' + COD_CONFIRMATION_PERCENT + '% (' + formatPrice(codAdvance) +Unknown directive
3638 ') now to confirm. Balance ' + formatPrice(codBalance) + ' is payable on delivery.</div>'Syntax not understood
3639 : '';Unknown directive
3641 document.getElementById("checkoutSummary").innerHTML =Syntax not understood
3642 '<strong>Order Summary</strong><br><br>' +Syntax not understood
3643 lines.join("<br>") +Syntax not understood
3644 '<div style="margin-top:14px;padding-top:12px;border-top:1px solid #ddd;">' +Unknown directive
3645 '<div style="display:flex;justify-content:space-between;gap:12px;"><span>Products</span><strong>' + formatPrice(total) + '</strong></div>' +Unknown directive
3646 discountLine +Syntax not understood
3647 shippingLine +Syntax not understood
3648 codLine +Syntax not understood
3649 '<div style="margin-top:12px;padding-top:10px;border-top:1px solid #ddd;display:flex;justify-content:space-between;gap:12px;font-size:17px;">' +Unknown directive
3650 '<strong>Grand Total</strong><strong>' + formatPrice(grandTotal) + '</strong>' +Syntax not understood
3651 '</div>' +Syntax not understood
3652 '</div>' +Syntax not understood
3653 codConfirmLine +Syntax not understood
3654 '<div id="shippingStatus" style="margin-top:12px;display:' +Unknown directive
3655 (pincode.length === 6 ? "block" : "none") + ';"></div>';Unknown directive
3656}Syntax not understood
3659async function placeOrder() {Syntax not understood
3660 if (orderSubmissionInProgress) return;Syntax not understood
3662 const name = document.getElementById("customerName").value.trim();Syntax not understood
3663 const email = document.getElementById("customerEmail")Syntax not understood
3664 ? document.getElementById("customerEmail").value.trim().toLowerCase()Syntax not understood
3665 : (currentCustomer ? String(currentCustomer.email || "").trim().toLowerCase() : "");Unknown directive
3666 const mobile = document.getElementById("customerMobile").value.trim();Syntax not understood
3667 const doorNo = document.getElementById("customerDoorNo") ? document.getElementById("customerDoorNo").value.trim() : "";Unknown directive
3668 const street = document.getElementById("customerStreet") ? document.getElementById("customerStreet").value.trim() : "";Unknown directive
3669 const locality = document.getElementById("customerLocality") ? document.getElementById("customerLocality").value.trim() : "";Unknown directive
3670 const city = document.getElementById("customerCity").value.trim();Syntax not understood
3671 const state = document.getElementById("customerState").value.trim();Syntax not understood
3672 const pincode = document.getElementById("customerPincode").value.trim();Syntax not understood
3673 const address = [doorNo, street, locality, city, state, pincode].filter(Boolean).join(", ");Syntax not understood
3674 const legacyAddress = document.getElementById("customerAddress");Syntax not understood
3675 if (legacyAddress) legacyAddress.value = address;Syntax not understood
3676 const payment = document.querySelector('input[name="payment"]:checked');Unknown directive
3677 const button = document.querySelector(".place-order");Syntax not understood
3678 const honeypot = document.getElementById("customerWebsite");Syntax not understood
3680 if (honeypot && honeypot.value.trim()) return alert("Unable to submit this order. Please refresh and try again.");Syntax not understood
3681 if (!name) return alert("Please enter your name.");Syntax not understood
3682 if (!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(email)) return alert("Please enter a valid email address.");Syntax not understood
3683 if (!/^[0-9]{10}$/.test(mobile)) return alert("Please enter a valid 10 digit mobile number.");Syntax not understood
3684 if (!address) return alert("Please enter your address.");Syntax not understood
3685 if (!city) return alert("Please enter your city.");Syntax not understood
3686 if (!state) return alert("Please enter your state.");Syntax not understood
3687 if (!/^\d{6}$/.test(pincode)) return alert("Please enter a valid 6 digit pincode.");Syntax not understood
3688 if (!payment) return alert("Please select a payment method.");Syntax not understood
3689 if (!cart.length) return alert("Your cart is empty.");Syntax not understood
3691 orderSubmissionInProgress = true;Syntax not understood
3692 if (button) {Syntax not understood
3693 button.disabled = true;Syntax not understood
3694 button.textContent = "Checking Delivery...";Syntax not understood
3695 await new Promise(function(resolve) { setTimeout(resolve, 60); });Syntax not understood
3696 button.style.opacity = "0.7";Syntax not understood
3697 button.style.cursor = "wait";Syntax not understood
3698 }Syntax not understood
3700 try {Syntax not understood
3701 if (!delhiveryShippingQuote) {Syntax not understood
3702 await refreshDelhiveryShippingQuote();Syntax not understood
3703 if (!delhiveryShippingQuote) {Syntax not understood
3704 throw new Error("Please wait for delivery availability and shipping charge to be calculated.");Syntax not understood
3705 }Syntax not understood
3706 }Syntax not understood
3708 const orderId = "DN" + Date.now().toString().slice(-8);Syntax not understood
3709 const orderItems = cart.map(function(item) {Syntax not understood
3710 const product = products.find(function(p) { return p.id === item.id; });Syntax not understood
3711 return {Syntax not understood
3712 id: item.id,Unknown directive
3713 name: product ? product.name : "",Unknown directive
3714 quantity: item.quantity,Unknown directive
3715 price: product ? numberPrice(product.sellingPrice) : 0Unknown directive
3716 };Syntax not understood
3717 });Syntax not understood
3719 const productTotal = orderItems.reduce(function(sum, item) {Syntax not understood
3720 return sum + Number(item.price || 0) * Number(item.quantity || 0);Syntax not understood
3721 }, 0);Syntax not understood
3723 const prepaidDiscount = payment.value === "UPI"Syntax not understood
3724 ? getPrepaidDiscount(productTotal)Syntax not understood
3725 : 0;Unknown directive
3726 const shippingCharge = numberPrice(delhiveryShippingQuote.customerShipping);Syntax not understood
3727 const codCharge = payment.value === "COD"Syntax not understood
3728 ? numberPrice(delhiveryShippingQuote.codCharge)Syntax not understood
3729 : 0;Unknown directive
3730 const discountedProductTotal = Math.max(0, productTotal - prepaidDiscount);Syntax not understood
3731 const total = Math.round(Syntax not understood
3732 (discountedProductTotal + shippingCharge + codCharge) * 100Syntax not understood
3733 ) / 100;Syntax not understood
3734 const codConfirmationAmount = payment.value === "COD"Syntax not understood
3735 ? Math.round(total * COD_CONFIRMATION_PERCENT / 100 * 100) / 100Syntax not understood
3736 : 0;Unknown directive
3737 const codBalanceAfterConfirmation = payment.value === "COD"Syntax not understood
3738 ? Math.max(0, Math.round((total - codConfirmationAmount) * 100) / 100)Syntax not understood
3739 : 0;Unknown directive
3741 const orderData = {Syntax not understood
3742 website: honeypot ? honeypot.value.trim() : "",Unknown directive
3743 orderId: orderId,Unknown directive
3744 customer: {Unknown directive
3745 name: name,Unknown directive
3746 email: email,Unknown directive
3747 mobile: mobile,Unknown directive
3748 address: address,Unknown directive
3749 city: city,Unknown directive
3750 locality: locality,Unknown directive
3751 district: city,Unknown directive
3752 state: state,Unknown directive
3753 pincode: pincodeUnknown directive
3754 },Syntax not understood
3755 paymentMethod: payment.value === "COD" ? "COD" : "UPI / Online Payment",Unknown directive
3756 items: orderItems,Unknown directive
3757 subtotal: productTotal,Unknown directive
3758 prepaidDiscount: prepaidDiscount,Unknown directive
3759 shippingCharge: shippingCharge,Unknown directive
3760 codCharge: codCharge,Unknown directive
3761 codConfirmationAmount: codConfirmationAmount,Unknown directive
3762 codAdvancePercent: payment.value === "COD" ? COD_CONFIRMATION_PERCENT : 0,Unknown directive
3763 codBalance: codBalanceAfterConfirmation,Unknown directive
3764 shippingDetails: {Unknown directive
3765 provider: "Delhivery",Unknown directive
3766 originPincode: delhiveryShippingQuote.originPincode,Unknown directive
3767 destinationPincode: delhiveryShippingQuote.destinationPincode,Unknown directive
3768 weightGrams: delhiveryShippingQuote.weightGrams,Unknown directive
3769 actualShipping: delhiveryShippingQuote.actualShipping,Unknown directive
3770 customerSharePercent: 70,Unknown directive
3771 dhiveenSharePercent: 30,Unknown directive
3772 transportMode: "Surface"Unknown directive
3773 },Syntax not understood
3774 total: total,Unknown directive
3775 createdAt: new Date().toISOString()Unknown directive
3776 };Syntax not understood
3778 if (currentCustomer) {Syntax not understood
3779 // Profile persistence is secondary to checkout. Do not make theSyntax not understood
3780 // customer wait for this separate database write.Syntax not understood
3781 saveCheckoutDetailsForProfile({Syntax not understood
3782 name: name,Unknown directive
3783 mobile: mobile,Unknown directive
3784 address: address,Unknown directive
3785 city: city,Unknown directive
3786 state: state,Unknown directive
3787 pincode: pincodeUnknown directive
3788 }).catch(function(error) {Syntax not understood
3789 console.warn("Checkout profile save skipped:", error);Unknown directive
3790 });Syntax not understood
3791 }Syntax not understood
3793 const paymentAmount = payment.value === "COD" ? codConfirmationAmount : total;Unknown directive
3795 if (button) button.textContent = "Creating Order...";Syntax not understood
3797 const pendingResponse = await fetch("/api/orders", {Syntax not understood
3798 method: "POST",Unknown directive
3799 headers: { "content-type": "application/json" },Unknown directive
3800 body: JSON.stringify({ ...orderData, status: "Payment Pending" })Unknown directive
3801 });Syntax not understood
3803 const pendingText = await pendingResponse.text();Syntax not understood
3804 let pendingResult = null;Syntax not understood
3805 try { pendingResult = JSON.parse(pendingText); } catch (e) {}Syntax not understood
3806 if (!pendingResponse.ok || !pendingResult || !pendingResult.success) {Syntax not understood
3807 throw new Error((pendingResult && (pendingResult.message || pendingResult.error)) || "Could not create the pending order.");Syntax not understood
3808 }Syntax not understood
3810 if (button) button.textContent = "Preparing Payment...";Syntax not understood
3812 const cashfreeResponse = await fetch("/api/cashfree/create-order", {Syntax not understood
3813 method: "POST",Unknown directive
3814 headers: { "content-type": "application/json" },Unknown directive
3815 body: JSON.stringify({Unknown directive
3816 orderId: orderId,Unknown directive
3817 amount: paymentAmount,Unknown directive
3818 customer: { name: name, mobile: mobile }Unknown directive
3819 })Syntax not understood
3820 });Syntax not understood
3822 const cashfreeText = await cashfreeResponse.text();Syntax not understood
3823 let cashfreeData = null;Syntax not understood
3824 try { cashfreeData = JSON.parse(cashfreeText); } catch (e) {}Syntax not understood
3825 if (!cashfreeResponse.ok || !cashfreeData || !cashfreeData.success) {Syntax not understood
3826 throw new Error((cashfreeData && (cashfreeData.error || cashfreeData.message)) || "Cashfree payment could not be started.");Syntax not understood
3827 }Syntax not understood
3829 orderData.cashfreeConfirmationAmount = paymentAmount;Syntax not understood
3830 localStorage.setItem("dhiveen_pending_cashfree_order", JSON.stringify(orderData));Syntax not understood
3832 if (typeof window.Cashfree !== "function") {Syntax not understood
3833 throw new Error("Cashfree Checkout SDK did not load. Please refresh and try again.");Syntax not understood
3834 }Syntax not understood
3836 if (button) button.textContent = "Opening Secure Payment...";Syntax not understood
3837 const cashfree = window.Cashfree({ mode: "production" });Unknown directive
3838 await cashfree.checkout({Syntax not understood
3839 paymentSessionId: cashfreeData.paymentSessionId,Unknown directive
3840 redirectTarget: "_self"Unknown directive
3841 });Syntax not understood
3843 if (button) button.textContent = "Redirecting to Payment...";Syntax not understood
3844 } catch (error) {Syntax not understood
3845 console.error("Order/payment failed:", error);Unknown directive
3846 orderSubmissionInProgress = false;Syntax not understood
3847 if (button) {Syntax not understood
3848 button.disabled = false;Syntax not understood
3849 button.textContent = "Place Order";Syntax not understood
3850 button.style.opacity = "";Syntax not understood
3851 button.style.cursor = "";Syntax not understood
3852 }Syntax not understood
3853 alert(error.message || "Please try again.");Syntax not understood
3854 }Syntax not understood
3855}Syntax not understood
3858function closeCheckoutAndContinue() {Syntax not understood
3860 orderSubmissionInProgress = false;Syntax not understood
3862 documentSyntax not understood
3863 .getElementById(Syntax not understood
3864 "checkoutOverlay"Syntax not understood
3865 )Syntax not understood
3866 .classList.remove(Syntax not understood
3867 "show"Syntax not understood
3868 );Syntax not understood
3870 setTimeout(Syntax not understood
3871 resetCheckout,Syntax not understood
3872 300Syntax not understood
3873 );Syntax not understood
3875}Syntax not understood
3878let orderSubmissionInProgress = false;Syntax not understood
3880function resetCheckout() {Syntax not understood
3882 orderSubmissionInProgress = false;Syntax not understood
3883 prepaidDiscountPercentForCheckout = null;Syntax not understood
3885 documentSyntax not understood
3886 .getElementById(Syntax not understood
3887 "checkoutContent"Syntax not understood
3888 )Syntax not understood
3889 .innerHTML =Syntax not understood
3891 '<h2>Checkout</h2>' +Syntax not understood
3893 '<button type="button" class="checkout-close" aria-label="Close checkout" onclick="closeCheckoutAndContinue()">×</button>' +Syntax not understood
3895 '<div class="form-group">' +Syntax not understood
3896 '<label>Email Address</label>' +Syntax not understood
3897 '<input id="customerEmail" type="email" placeholder="Enter your email" autocomplete="email">' +Syntax not understood
3898 '</div>' +Syntax not understood
3900 '<div class="form-group">' +Syntax not understood
3901 '<label>Full Name</label>' +Syntax not understood
3902 '<input id="customerName" type="text" placeholder="Enter your name">' +Syntax not understood
3903 '</div>' +Syntax not understood
3905 '<div class="form-group">' +Syntax not understood
3906 '<label>Mobile Number</label>' +Syntax not understood
3907 '<input id="customerMobile" type="tel" maxlength="10" placeholder="10 digit mobile number">' +Syntax not understood
3908 '</div>' +Syntax not understood
3910 '<div class="form-group">' +Syntax not understood
3911 '<label>Door Number</label>' +Syntax not understood
3912 '<input id="customerDoorNo" type="text" maxlength="80" placeholder="Door / Flat Number" autocomplete="address-line1">' +Syntax not understood
3913 '</div>' +Syntax not understood
3915 '<div class="form-group">' +Syntax not understood
3916 '<label>Street / Area</label>' +Syntax not understood
3917 '<input id="customerStreet" type="text" maxlength="180" placeholder="Street / Area / Landmark" autocomplete="address-line2">' +Syntax not understood
3918 '<textarea id="customerAddress" style="display:none" aria-hidden="true"></textarea>' +Unknown directive
3919 '</div>' +Syntax not understood
3921 '<div class="form-group">' +Syntax not understood
3922 '<label>PIN Code</label>' +Syntax not understood
3923 '<input id="customerPincode" type="text" inputmode="numeric" maxlength="6" placeholder="6-digit PIN Code" autocomplete="postal-code">' +Syntax not understood
3924 '<small id="pincodeLookupStatus" style="display:block;margin-top:6px;color:#a8a58d;">Enter PIN Code to find Village / Post Office.</small>' +Unknown directive
3925 '</div>' +Syntax not understood
3927 '<div class="form-group">' +Syntax not understood
3928 '<label>Village / Post Office</label>' +Syntax not understood
3929 '<input id="customerLocality" type="text" list="customerLocalityOptions" placeholder="Enter PIN Code first" autocomplete="address-level3" maxlength="100">' +Syntax not understood
3930 '<datalist id="customerLocalityOptions"></datalist>' +Syntax not understood
3931 '</div>' +Syntax not understood
3933 '<div class="form-group">' +Syntax not understood
3934 '<label>District</label>' +Syntax not understood
3935 '<input id="customerCity" type="text" placeholder="Auto-filled from Post Office" readonly>' +Syntax not understood
3936 '</div>' +Syntax not understood
3938 '<div class="form-group">' +Syntax not understood
3939 '<label>State</label>' +Syntax not understood
3940 '<input id="customerState" type="text" placeholder="Auto-filled from Post Office" readonly>' +Syntax not understood
3941 '</div>' +Syntax not understood
3943 '<div class="form-group">' +Syntax not understood
3944 '<label>Full Delivery Address (Preview)</label>' +Syntax not understood
3945 '<textarea id="customerAddressPreview" rows="4" readonly placeholder="Your complete delivery address will appear here" style="width:100%;box-sizing:border-box;resize:vertical;background:#f3f6f4;color:#18352c;"></textarea>' +Unknown directive
3946 '</div>' +Syntax not understood
3948 '<div class="form-group" style="position:absolute;left:-10000px;top:auto;width:1px;height:1px;overflow:hidden;" aria-hidden="true">' +Unknown directive
3949 '<label for="customerWebsite">Leave this field empty</label>' +Syntax not understood
3950 '<input id="customerWebsite" type="text" tabindex="-1" autocomplete="off">' +Syntax not understood
3951 '</div>' +Syntax not understood
3953 '<div class="payment-box">' +Syntax not understood
3955 '<strong>Payment Method</strong>' +Syntax not understood
3957 '<label>' +Syntax not understood
3958 '<input type="radio" name="payment" value="UPI">' +Syntax not understood
3959 ' UPI / Online Payment' +Syntax not understood
3960 '</label>' +Syntax not understood
3962 '<label>' +Syntax not understood
3963 '<input type="radio" name="payment" value="COD" checked>' +Syntax not understood
3964 ' Cash on Delivery' +Syntax not understood
3965 '</label>' +Syntax not understood
3967 '</div>' +Syntax not understood
3969 '<div class="order-summary" id="checkoutSummary"></div>' +Syntax not understood
3971 '<button class="place-order" onclick="placeOrder()">' +Syntax not understood
3972 'Place Order' +Syntax not understood
3973 '</button>';Syntax not understood
3975}Syntax not understood
3978/* Keep the visible full-address preview and legacy order address in sync. */Syntax not understood
3979function updateCheckoutAddressPreview() {Syntax not understood
3980 const get = function (id) {Syntax not understood
3981 const element = document.getElementById(id);Syntax not understood
3982 return element ? element.value.trim() : "";Unknown directive
3983 };Syntax not understood
3984 const name = get("customerName");Syntax not understood
3985 const doorNo = get("customerDoorNo");Syntax not understood
3986 const street = get("customerStreet");Syntax not understood
3987 const locality = get("customerLocality");Syntax not understood
3988 const district = get("customerCity");Syntax not understood
3989 const state = get("customerState");Syntax not understood
3990 const pincode = get("customerPincode");Syntax not understood
3991 const previewLines = [];Syntax not understood
3992 if (name) previewLines.push(name);Syntax not understood
3993 const firstAddressLine = [doorNo, street].filter(Boolean).join(", ");Syntax not understood
3994 if (firstAddressLine) previewLines.push(firstAddressLine);Syntax not understood
3995 if (locality) previewLines.push(locality);Syntax not understood
3996 if (district) previewLines.push(district);Syntax not understood
3997 const statePinLine = [state, pincode ? "PIN Code: " + pincode : ""].filter(Boolean).join(" - ");Unknown directive
3998 if (statePinLine) previewLines.push(statePinLine);Syntax not understood
3999 const preview = document.getElementById("customerAddressPreview");Syntax not understood
4000 if (preview) preview.value = previewLines.join("\n");Syntax not understood
4001 const legacyAddress = document.getElementById("customerAddress");Syntax not understood
4002 if (legacyAddress) legacyAddress.value = [doorNo, street, locality, district, state, pincode].filter(Boolean).join(", ");Syntax not understood
4003}Syntax not understood
4005document.addEventListener("input", function (event) {Syntax not understood
4006 if (event.target && ["customerName", "customerDoorNo", "customerStreet", "customerLocality", "customerCity", "customerState", "customerPincode"].includes(event.target.id)) {Syntax not understood
4007 updateCheckoutAddressPreview();Syntax not understood
4008 }Syntax not understood
4009});Syntax not understood
4010document.addEventListener("change", function (event) {Syntax not understood
4011 if (event.target && ["customerName", "customerDoorNo", "customerStreet", "customerLocality", "customerCity", "customerState", "customerPincode"].includes(event.target.id)) {Syntax not understood
4012 updateCheckoutAddressPreview();Syntax not understood
4013 }Syntax not understood
4014});Syntax not understood
4016/* Free PIN Code lookup: searchable Post Office names, then district/state auto-fill. */Unknown directive
4017let pinLookupTimer = null;Syntax not understood
4018let pinLookupRequestId = 0;Syntax not understood
4019let pinLookupOffices = [];Syntax not understood
4020let lastPinLookupValue = "";Syntax not understood
4022async function lookupCheckoutPincode(pin) {Syntax not understood
4023 const status = document.getElementById("pincodeLookupStatus");Syntax not understood
4024 const locality = document.getElementById("customerLocality");Syntax not understood
4025 const options = document.getElementById("customerLocalityOptions");Syntax not understood
4026 const city = document.getElementById("customerCity");Syntax not understood
4027 const state = document.getElementById("customerState");Syntax not understood
4028 if (!status || !locality || !options || !city || !state) return;Syntax not understood
4029 const requestId = ++pinLookupRequestId;Syntax not understood
4030 pinLookupOffices = [];Syntax not understood
4031 lastPinLookupValue = pin;Syntax not understood
4032 options.innerHTML = "";Syntax not understood
4033 locality.value = "";Syntax not understood
4034 city.value = "";Syntax not understood
4035 state.value = "";Syntax not understood
4036 if (!/^\d{6}$/.test(pin)) { status.textContent = "Enter a valid 6-digit PIN Code."; return; }Syntax not understood
4037 status.textContent = "Finding Post Offices…";Syntax not understood
4038 try {Syntax not understood
4039 const response = await fetch("/api/pincode?pin=" + encodeURIComponent(pin), { cache: "no-store" });Unknown directive
4040 const data = await response.json();Syntax not understood
4041 if (requestId !== pinLookupRequestId) return;Syntax not understood
4042 if (!response.ok || !data.success) throw new Error(data.error || "Lookup unavailable.");Syntax not understood
4043 pinLookupOffices = Array.isArray(data.postOffices) ? data.postOffices : [];Unknown directive
4044 const unique = new Map();Syntax not understood
4045 pinLookupOffices.forEach(function (office) {Syntax not understood
4046 const key = [office.name, office.district, office.state].join("|");Syntax not understood
4047 if (!unique.has(key)) unique.set(key, office);Syntax not understood
4048 });Syntax not understood
4049 pinLookupOffices = Array.from(unique.values());Syntax not understood
4050 options.innerHTML = pinLookupOffices.map(function (office) {Syntax not understood
4051 const option = document.createElement("option");Syntax not understood
4052 option.value = office.name;Syntax not understood
4053 option.label = office.name + " — " + office.district + ", " + office.state;Syntax not understood
4054 return option.outerHTML;Syntax not understood
4055 }).join("");Syntax not understood
4056 status.textContent = pinLookupOffices.lengthSyntax not understood
4057 ? pinLookupOffices.length + " Post Office option(s) found. Type a name or select from suggestions."Syntax not understood
4058 : "No Post Office found for this PIN. Enter Village, District and State manually.";Unknown directive
4059 city.readOnly = false;Syntax not understood
4060 state.readOnly = false;Syntax not understood
4061 } catch (error) {Syntax not understood
4062 if (requestId !== pinLookupRequestId) return;Syntax not understood
4063 status.textContent = "PIN lookup unavailable. Please enter Village, District and State manually.";Syntax not understood
4064 city.readOnly = false;Syntax not understood
4065 state.readOnly = false;Syntax not understood
4066 }Syntax not understood
4067}Syntax not understood
4069function applySelectedPostOffice() {Syntax not understood
4070 const locality = document.getElementById("customerLocality");Syntax not understood
4071 const city = document.getElementById("customerCity");Syntax not understood
4072 const state = document.getElementById("customerState");Syntax not understood
4073 const pin = document.getElementById("customerPincode");Syntax not understood
4074 if (!locality || !city || !state || !pin) return;Syntax not understood
4075 const name = locality.value.trim().toLowerCase();Syntax not understood
4076 const office = pinLookupOffices.find(function (item) {Syntax not understood
4077 return item.name.toLowerCase() === name && item.pincode === pin.value.trim();Syntax not understood
4078 });Syntax not understood
4079 if (office) {Syntax not understood
4080 city.value = office.district;Syntax not understood
4081 state.value = office.state;Syntax not understood
4082 city.readOnly = true;Syntax not understood
4083 state.readOnly = true;Syntax not understood
4084 const status = document.getElementById("pincodeLookupStatus");Syntax not understood
4085 if (status) status.textContent = office.name + " selected. District and State filled automatically.";Syntax not understood
4086 updateCheckoutAddressPreview();Syntax not understood
4087 } else {Syntax not understood
4088 city.readOnly = false;Syntax not understood
4089 state.readOnly = false;Syntax not understood
4090 }Syntax not understood
4091}Syntax not understood
4093document.addEventListener("input", function (event) {Syntax not understood
4094 if (event.target && event.target.id === "customerPincode") {Syntax not understood
4095 const pin = event.target.value.replace(/\D/g, "").slice(0, 6);Syntax not understood
4096 event.target.value = pin;Syntax not understood
4097 clearTimeout(pinLookupTimer);Syntax not understood
4098 if (pin.length === 6 && pin !== lastPinLookupValue) {Syntax not understood
4099 pinLookupTimer = setTimeout(function () { lookupCheckoutPincode(pin); }, 300);Syntax not understood
4100 } else if (pin.length < 6) {Syntax not understood
4101 pinLookupRequestId++; pinLookupOffices = []; lastPinLookupValue = "";Syntax not understood
4102 const locality = document.getElementById("customerLocality");Syntax not understood
4103 const options = document.getElementById("customerLocalityOptions");Syntax not understood
4104 const city = document.getElementById("customerCity");Syntax not understood
4105 const state = document.getElementById("customerState");Syntax not understood
4106 const status = document.getElementById("pincodeLookupStatus");Syntax not understood
4107 if (locality) locality.value = ""; if (options) options.innerHTML = "";Syntax not understood
4108 if (city) { city.value = ""; city.readOnly = false; }Syntax not understood
4109 if (state) { state.value = ""; state.readOnly = false; }Syntax not understood
4110 if (status) status.textContent = "Enter PIN Code to find Village / Post Office.";Syntax not understood
4111 }Syntax not understood
4112 if (pin.length === 6) scheduleDelhiveryShippingQuote();Syntax not understood
4113 else { clearTimeout(delhiveryQuoteTimer); delhiveryShippingQuote = null; renderCheckoutSummary(); }Syntax not understood
4114 }Syntax not understood
4115 if (event.target && event.target.id === "customerLocality") applySelectedPostOffice();Syntax not understood
4116});Syntax not understood
4117document.addEventListener("change", function (event) {Syntax not understood
4118 if (event.target && event.target.id === "customerLocality") applySelectedPostOffice();Syntax not understood
4119});Syntax not understood
4121/* Delhivery checkout listeners */Syntax not understood
4122document.addEventListener("change", function (event) {Syntax not understood
4123 if (event.target && event.target.name === "payment") {Syntax not understood
4124 clearTimeout(delhiveryQuoteTimer);Syntax not understood
4125 delhiveryShippingQuote = null;Syntax not understood
4126 renderCheckoutSummary();Syntax not understood
4128 const pincodeInput = document.getElementById("customerPincode");Syntax not understood
4129 if (pincodeInput && /^\d{6}$/.test(pincodeInput.value.trim())) {Syntax not understood
4130 scheduleDelhiveryShippingQuote();Syntax not understood
4131 }Syntax not understood
4132 }Syntax not understood
4133});Syntax not understood
4136const PREPAID_DISCOUNT_SLABS_CLIENT = [Syntax not understood
4137 { min: 99, max: 499.99, minDiscount: 5, maxDiscount: 5 },Unknown directive
4138 { min: 500, max: 999.99, minDiscount: 5, maxDiscount: 6 },Unknown directive
4139 { min: 1000, max: Infinity, minDiscount: 5, maxDiscount: 7 }Unknown directive
4140];Syntax not understood
4142const COD_CONFIRMATION_PERCENT_CLIENT = 20;Syntax not understood
4143let prepaidDiscountPercentForCheckout = null;Syntax not understood
4145function getPrepaidDiscountPercent(value) {Syntax not understood
4146 const amount = Number(value || 0);Syntax not understood
4148 for (const slab of PREPAID_DISCOUNT_SLABS_CLIENT) {Syntax not understood
4149 if (amount >= slab.min && amount <= slab.max) {Syntax not understood
4150 if (slab.minDiscount === slab.maxDiscount) {Syntax not understood
4151 return slab.minDiscount;Syntax not understood
4152 }Syntax not understood
4154 return slab.minDiscount +Syntax not understood
4155 Math.floor(Syntax not understood
4156 Math.random() *Syntax not understood
4157 (slab.maxDiscount - slab.minDiscount + 1)Syntax not understood
4158 );Syntax not understood
4159 }Syntax not understood
4160 }Syntax not understood
4162 return 0;Syntax not understood
4163}Syntax not understood
4165function getPrepaidDiscount(value) {Syntax not understood
4166 const amount = Number(value || 0);Syntax not understood
4168 if (prepaidDiscountPercentForCheckout === null) {Syntax not understood
4169 prepaidDiscountPercentForCheckout =Syntax not understood
4170 getPrepaidDiscountPercent(amount);Syntax not understood
4171 }Syntax not understood
4173 return Math.round(Syntax not understood
4174 amount * prepaidDiscountPercentForCheckout / 100 * 100Syntax not understood
4175 ) / 100;Syntax not understood
4176}Syntax not understood
4178const COD_CONFIRMATION_PERCENT = COD_CONFIRMATION_PERCENT_CLIENT;Syntax not understood
4180function numberPrice(value) {Syntax not understood
4182 const number =Syntax not understood
4183 parseFloat(Syntax not understood
4184 String(value || "")Syntax not understood
4185 .replace(Syntax not understood
4186 /[₹,\s]/g,Syntax not understood
4187 ""Syntax not understood
4188 )Syntax not understood
4189 );Syntax not understood
4191 return Number.isFinite(number)Syntax not understood
4192 ? numberSyntax not understood
4193 : 0;Unknown directive
4195}Syntax not understood
4198function formatPrice(value) {Syntax not understood
4200 return (Syntax not understood
4201 "₹" +Syntax not understood
4202 numberPrice(value)Syntax not understood
4203 .toLocaleString(Syntax not understood
4204 "en-IN",Syntax not understood
4205 {Syntax not understood
4206 maximumFractionDigits: 2Unknown directive
4207 }Syntax not understood
4208 )Syntax not understood
4209 );Syntax not understood
4211}Syntax not understood
4214function escapeClient(value) {Syntax not understood
4216 return String(value ?? "")Syntax not understood
4217 .replace(Syntax not understood
4218 /&/g,Syntax not understood
4219 "&amp;"Syntax not understood
4220 )Syntax not understood
4221 .replace(Syntax not understood
4222 /</g,Syntax not understood
4223 "&lt;"Syntax not understood
4224 )Syntax not understood
4225 .replace(Syntax not understood
4226 />/g,Syntax not understood
4227 "&gt;"Syntax not understood
4228 )Syntax not understood
4229 .replace(Syntax not understood
4230 /"/g,Syntax not understood
4231 "&quot;"Syntax not understood
4232 )Syntax not understood
4233 .replace(Syntax not understood
4234 /'/g,Syntax not understood
4235 "&#039;"Syntax not understood
4236 );Syntax not understood
4238}Syntax not understood
4241function encodeJS(value) {Syntax not understood
4243 return String(value ?? "")Syntax not understood
4244 .replace(Syntax not understood
4245 /\\/g,Syntax not understood
4246 "\\\\"Syntax not understood
4247 )Syntax not understood
4248 .replace(Syntax not understood
4249 /'/g,Syntax not understood
4250 "\\'"Syntax not understood
4251 )Syntax not understood
4252 .replace(Syntax not understood
4253 /"/g,Syntax not understood
4254 '\\"'Syntax not understood
4255 )Syntax not understood
4256 .replace(Syntax not understood
4257 /\n/g,Syntax not understood
4258 "\\n"Syntax not understood
4259 )Syntax not understood
4260 .replace(Syntax not understood
4261 /\r/g,Syntax not understood
4262 "\\r"Syntax not understood
4263 );Syntax not understood
4265}Syntax not understood
4268async function handleCashfreeReturn() {Syntax not understood
4269 const currentUrl = new URL(window.location.href);Syntax not understood
4270 const cashfreeOrderId = (currentUrl.searchParams.get("cashfree_order_id") || "").trim();Syntax not understood
4271 if (!cashfreeOrderId) return;Syntax not understood
4273 let pendingOrder = null;Syntax not understood
4274 try {Syntax not understood
4275 pendingOrder = JSON.parse(localStorage.getItem("dhiveen_pending_cashfree_order") || "null");Syntax not understood
4276 } catch (error) {Syntax not understood
4277 pendingOrder = null;Syntax not understood
4278 }Syntax not understood
4280 if (!pendingOrder || pendingOrder.orderId !== cashfreeOrderId) return;Syntax not understood
4282 try {Syntax not understood
4283 const response = await fetch(Syntax not understood
4284 "/api/cashfree/verify?orderId=" + encodeURIComponent(cashfreeOrderId),Syntax not understood
4285 { method: "GET", cache: "no-store" }Unknown directive
4286 );Syntax not understood
4287 const data = await response.json();Syntax not understood
4289 if (!response.ok || !data.success) {Syntax not understood
4290 throw new Error(data.error || "Cashfree payment verification failed.");Syntax not understood
4291 }Syntax not understood
4293 if (data.paid) {Syntax not understood
4294 const finalOrder = {Syntax not understood
4295 ...pendingOrder,Syntax not understood
4296 status: "Order Placed",Unknown directive
4297 paymentStatus: "PAID"Unknown directive
4298 };Syntax not understood
4300 localStorage.setItem("dhiveen_last_order", JSON.stringify(finalOrder));Syntax not understood
4301 localStorage.removeItem("dhiveen_pending_cashfree_order");Syntax not understood
4302 cart = [];Syntax not understood
4303 localStorage.removeItem("dhiveen_cart");Syntax not understood
4304 saveCart();Syntax not understood
4305 updateCart();Syntax not understood
4306 orderSubmissionInProgress = false;Syntax not understood
4308 const checkoutOverlay = document.getElementById("checkoutOverlay");Syntax not understood
4309 if (checkoutOverlay) checkoutOverlay.classList.add("show");Syntax not understood
4311 const paymentText = finalOrder.paymentMethod === "COD"Syntax not understood
4312 ? "COD confirmation advance received successfully."Syntax not understood
4313 : "Online payment received successfully.";Unknown directive
4314 const amountText = formatPrice(finalOrder.cashfreeConfirmationAmount || finalOrder.total || 0);Syntax not understood
4315 const balanceText = finalOrder.paymentMethod === "COD"Syntax not understood
4316 ? '<p><strong>Balance on Delivery:</strong> ' + formatPrice(finalOrder.codBalance || 0) + '</p>'Unknown directive
4317 : '';Unknown directive
4319 const emailBox = document.getElementById("checkoutContent");Syntax not understood
4320 emailBox.innerHTML =Syntax not understood
4321 '<div class="success" style="text-align:left;max-width:560px;margin:auto;">' +Unknown directive
4322 '<div class="success-icon" style="text-align:center;">✓</div>' +Unknown directive
4323 '<h2 style="text-align:center;">Order Confirmed!</h2>' +Unknown directive
4324 '<p style="text-align:center;">' + paymentText + '</p>' +Unknown directive
4325 '<div class="order-id" style="text-align:center;">Order ID: ' + escapeClient(cashfreeOrderId) + '</div>' +Unknown directive
4326 '<div style="margin-top:18px;padding:16px;border:1px solid #ddd;border-radius:12px;background:#fafafa;">' +Unknown directive
4327 '<p><strong>Payment:</strong> ' + escapeClient(finalOrder.paymentMethod || "Online Payment") + '</p>' +Unknown directive
4328 '<p><strong>Paid Now:</strong> ' + amountText + '</p>' +Unknown directive
4329 balanceText +Syntax not understood
4330 '<p><strong>Status:</strong> Order Placed</p>' +Unknown directive
4331 '<p><strong>Delivery:</strong> ' + escapeClient([finalOrder.customer.address, finalOrder.customer.city, finalOrder.customer.state, finalOrder.customer.pincode].filter(Boolean).join(", ")) + '</p>' +Unknown directive
4332 '<p><strong>Email:</strong> ' + escapeClient(finalOrder.customer.email || "") + '</p>' +Unknown directive
4333 '</div>' +Syntax not understood
4334 '<p id="orderEmailStatus" style="text-align:center;margin-top:14px;color:#555;">Sending order confirmation email...</p>' +Unknown directive
4335 '<div style="display:flex;gap:10px;justify-content:center;flex-wrap:wrap;margin-top:18px;">' +Unknown directive
4336 '<button class="continue-button" onclick="closeCheckoutAndTrack()">Track This Order</button>' +Syntax not understood
4337 '<button class="continue-button" onclick="closeCheckoutAndContinue()">Continue Shopping</button>' +Syntax not understood
4338 '</div>' +Syntax not understood
4339 '</div>';Syntax not understood
4341 try {Syntax not understood
4342 const emailResponse = await fetch("/api/order-confirmation-email", {Syntax not understood
4343 method: "POST",Unknown directive
4344 headers: { "content-type": "application/json" },Unknown directive
4345 body: JSON.stringify({ order: finalOrder })Unknown directive
4346 });Syntax not understood
4347 const emailData = await emailResponse.json();Syntax not understood
4348 const statusEl = document.getElementById("orderEmailStatus");Syntax not understood
4349 if (statusEl) {Syntax not understood
4350 statusEl.textContent = emailData.successSyntax not understood
4351 ? "✓ Order confirmation email sent to " + (finalOrder.customer.email || "your email")Syntax not understood
4352 : "Order confirmed. Email could not be sent right now.";Unknown directive
4353 statusEl.style.color = emailData.success ? "#1e6a2c" : "#9a2d2d";Syntax not understood
4354 }Syntax not understood
4355 } catch (emailError) {Syntax not understood
4356 const statusEl = document.getElementById("orderEmailStatus");Syntax not understood
4357 if (statusEl) {Syntax not understood
4358 statusEl.textContent = "Order confirmed. Email could not be sent right now.";Syntax not understood
4359 statusEl.style.color = "#9a2d2d";Syntax not understood
4360 }Syntax not understood
4361 }Syntax not understood
4362 } else {Syntax not understood
4363 alert("Cashfree payment was not completed. Your cart is still saved.");Syntax not understood
4364 orderSubmissionInProgress = false;Syntax not understood
4365 }Syntax not understood
4366 } catch (error) {Syntax not understood
4367 orderSubmissionInProgress = false;Syntax not understood
4368 alert(error.message || "Unable to verify Cashfree payment.");Syntax not understood
4369 } finally {Syntax not understood
4370 currentUrl.searchParams.delete("cashfree_order_id");Syntax not understood
4371 window.history.replaceState({}, document.title, currentUrl.pathname + currentUrl.search + currentUrl.hash);Syntax not understood
4372 }Syntax not understood
4373}Syntax not understood
4375loadWebsite();Syntax not understood
4377setTimeout(Syntax not understood
4378 handleCashfreeReturn,Syntax not understood
4379 700Syntax not understood
4380);Syntax not understood
4382</script>Syntax not understood
4384</body>Syntax not understood
4386</html>Syntax not understood

To appear in search results, crawlers need access to your app.

○Structured data is valid
●Page isn’t blocked from indexing
●Document has a `<title>` element
●Document has a meta description
●Page has successful HTTP status code
●Links have descriptive text
●Links are crawlable
●Image elements have `[alt]` attributes
●Document has a valid `hreflang`
○Document has a valid `rel=canonical`

Send Feedback