PageSourceSearch

https://yummiesfairwater.co.uk/menu

html yummiesfairwater.co.uk collected 2026-09-24 15:13:52 UTC 170,976 bytes, 5,265 lines download raw bytes

1
2     
3<!DOCTYPE html>
4<html lang="en" class="wide wow-animation   desktop landscape rd-navbar-static-linked">
5<head>
6 
7  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
8  <title>Pizza, Fried Chicken &amp; Kebab Delivery in Fairwater, Cardiff | Order Online  | Yummies Fairwater   </title>
9  <meta name="format-detection" content="telephone=no" />
10<meta name="description" content="Order pizza, fried chicken &amp;amp; kebab in Fairwater, Cardiff from Yummies Fairwater. Fast delivery and collection available.">
11<script type="application/ld+json">
12{"@context":"https://schema.org","@type":"FastFoodRestaurant","name":"Yummies Fairwater","url":"https://yummiesfairwater.co.uk","hasMenu":"https://yummiesfairwater.co.uk/menu","image":"https://yummiesfairwater.co.uk/sitelogo/sitelogo.png","telephone":"02920 568 812","servesCuisine":"Pizza, Fried Chicken & Kebab","address":{"@type":"PostalAddress","streetAddress":"56A Plas-Mawr Road","addressLocality":"Fairwater, Cardiff","postalCode":"CF5 3JX","addressCountry":"GB"},"geo":{"@type":"GeoCoordinates","latitude":"51.492930","longitude":"-3.243940"},"openingHoursSpecification":[{"@type":"OpeningHoursSpecification","dayOfWeek":"https://schema.org/Sunday","opens":"15:00","closes":"21:00"},{"@type":"OpeningHoursSpecification","dayOfWeek":"https://schema.org/Tuesday","opens":"16:00","closes":"22:30"},{"@type":"OpeningHoursSpecification","dayOfWeek":"https://schema.org/Wednesday","opens":"16:00","closes":"22:30"},{"@type":"OpeningHoursSpecification","dayOfWeek":"https://schema.org/Thursday","opens":"16:00","closes":"22:30"},{"@type":"OpeningHoursSpecification","dayOfWeek":"https://schema.org/Friday","opens":"15:00","closes":"22:30"},{"@type":"OpeningHoursSpecification","dayOfWeek":"https://schema.org/Saturday","opens":"15:00","closes":"22:30"}]}
13</script>
13
14
15
16  <meta name="viewport" content="width=device-width, initial-scale=1">
17  <meta http-equiv="X-UA-Compatible" content="IE=edge" />
18  <meta name="theme-color">
19  <link rel="icon" href="data:;base64,=">
20  <meta charset="utf-8" />
21  <link rel="stylesheet" type="text/css" href="css/style.css" />
22  <link href="css/theme.css?v=5" rel="stylesheet">
23  <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:400,300,100">
24 
25  <meta name="appleid-signin-client-id" content="com.boostit.appleSignIn">
26  <meta name="appleid-signin-scope" content="name email">
27  <meta name="appleid-signin-redirect-uri" content="https://yummiesfairwater.co.uk/auth/apple/callback">
28  <meta name="appleid-signin-state" content="origin:web">
29  <meta name="appleid-signin-use-popup" content="true">
30
31  <style>
32
33
34.rowff .col-xs-6{
35width: 50% !important;
36}
37
38.rowff .col-xs-12{
39text-align:center;
40}
41
42    #appleid-signin{
43      width: 235px;
44        height: 50px;
45        text-align: center;
46        display: inline-block;
47
48        width: 235px;
49    height: 51px;
50    text-align: center;
51    display: inline-block;
52    background: black;
53    line-height: 50px;
54    display: -webkit-inline-box;
55    /* margin-top: -10px; */
56    padding: 5px 0px;
57    border-radius: 8px;
58    
59    }
60
61    
62
63    
64    .appleid-signin{
65      width: 235px;
66        height: 50px;
67        text-align: center;
68        display: inline-block;
69
70        width: 235px;
71    height: 51px;
72    text-align: center;
73    display: inline-block;
74    background: black;
75    line-height: 50px;
76    display: -webkit-inline-box;
77    /* margin-top: -10px; */
78    padding: 5px 0px;
79    border-radius: 8px;
80    
81    }
82
83    .appleButton {
84      width: 245px;
85    height: 56px;
86    background: black;
87    border: none;
88    border-radius: 8px;
89    padding: 5px 0;
90    cursor: pointer;
91    display: inline-flex;
92    justify-content: center;
93    align-items: center;
94}
95
96.appleButton img {
97       width: auto;
98    /* height: 58px; */
99    display: block;
100    transform: scale(1.35);
101}
102.s2x1y1{
103  overflow-x: hidden;
104}
105 
106.s2x1y1ios{
107  overflow-x: hidden;
108}
109
110 
111 
112    
113    
114    .social-btn .btn {
115        border: none;
116        margin: 10px 3px 0;
117        opacity: 1;
118        width: 45%;
119        height: 47px;
120        padding: 12px 27px;
121        font-size: 14px;
122        border-radius: 9px;
123    }
124    
125    </style>
126
127</head>
128
129<body>
130
131  <div id="modalArea"></div>
132  <div id="modalArea3"></div>
133 
134 
135  <div class="page">
136    <div class="page-loader" style="background:black;">
137      <div class="page-loader-body">
138        <div class="cssload-container">
139           <img src="/sitelogo/sitelogo.png" style="margin-top:-150px;  ">
140        </div>
141      </div>
142    </div>
143  </div>
144  <header class="page-head">
145    <div class="rd-navbar-wrap rd-navbar-minimal">
146      <nav data-layout="rd-navbar-fixed" data-sm-layout="rd-navbar-fixed" data-md-device-layout="rd-navbar-fixed"
147        data-lg-layout="rd-navbar-static" data-lg-device-layout="rd-navbar-static" data-stick-up-clone="false"
148        data-md-stick-up-offset="100px" data-lg-stick-up-offset="100px" class="rd-navbar">
149        <div class="shell shell-fluid">
150          <div class="rd-navbar-inner">
151            <!-- RD Navbar Panel-->
152            <div class="rd-navbar-panel">
153              <!-- RD Navbar Toggle-->
154              <button data-rd-navbar-toggle=".rd-navbar-nav-wrap" class="rd-navbar-toggle">
155                <span></span>
156              </button>
157              <a href="/menu" class="rd-navbar-brand brand" id="menuhxy">
158                <div class="brand-logo"  > 
159                   <img src="/sitelogo/sitelogo.png" height="90" style=" height: 31px; margin-top: 4px; width: 200px; margin-left:-3px;" alt="">
160                </div>
161              </a>
162              <div class=" rd-navbar-brand brand" id="cartdivision" onclick="enableCart();">
163                <div class="shop-cardt">
164                      <!-- <i class="thin-icon-cartShop icon-basket-general"></i> -->
165
166     <svg width="30" height="30" viewBox="0 0 24 24" fill="" stroke="green" stroke-width="2.0" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" style="margin-right:4px;">
167  <circle cx="9" cy="21" r="1"></circle>
168  <circle cx="20" cy="21" r="1"></circle>
169  <path d="M1 1h4l2.7 13.4a2 2 0 0 0 2 1.6h8.9a2 2 0 0 0 1.9-1.4L23 6H6"></path>
170</svg>
171
172
173 <!-- <svg class="nav-iconx" viewBox="0 0 24 24" aria-hidden="true">
174  <path d="M3 6h18M3 12h18M3 18h18"
175        stroke="currentColor"
176        stroke-width="2.5"
177        stroke-linecap="round"/>
178</svg> -->
179
180
181                    <a id="basketShow" class="basketClass basketxyz" style="display:inline;">0 Items </a>
182                </div>
183              </div> 
184            </div>
185            <div class="rd-navbar-nav-wrap">
186              <ul class="rd-navbar-nav">
187               <li id="menlink">
188  <a href="/menu" class="navbar-iconx">
189    
190<svg class="nav-iconx" viewBox="0 0 24 24" aria-hidden="true">
191  <path d="M6 2v8M9 2v8M6 6h3M7.5 10v12" 
192        stroke="currentColor" 
193        stroke-width="1.8" 
194        stroke-linecap="round"/>
195
196  <path d="M14 2c0 4 4 4 4 8v12" 
197        stroke="currentColor" 
198        stroke-width="1.8" 
199        stroke-linecap="round"/>
200</svg>
201    <span>MENU</span>
202    
203  </a>
204</li>
205               <li>
206 
207
208 
209
210<a href="/checkout" class="navbar-iconx">
211  <span class="checkout-svg-wrap">
212   <svg class="nav-iconx" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round">
213    <circle cx="9" cy="21" r="1"></circle>
214    <circle cx="20" cy="21" r="1"></circle>
215    <path d="M1 1h4l2.7 13.4a2 2 0 0 0 2 1.6h8.9a2 2 0 0 0 1.9-1.4L23 6H6"></path>
216  </svg>
217  </span>
218  <span class="checkout-text">CHECKOUT</span>
219</a>
220
221  
222</li>
223                
224                <li>
225                  <a class="navbar-icon thin-icon-key" data-toggle="modal" data-target="#loginModal">Login </a>
226                </li>
227                <li>
228                  <a class="navbar-icon thin-icon-layers" data-toggle="modal" data-target="#registerModal">Register </a>
229                </li>
230                
231 
232                 
233                 <li>
234  <a href="/contact" class="navbar-iconx">
235    <span class="checkout-svg-wrap">
236      <svg class="nav-iconx" viewBox="0 0 24 24">
237        <rect x="3" y="5" width="18" height="14" stroke="currentColor" stroke-width="1.8" fill="none"/>
238        <path d="M3 7l9 6 9-6" stroke="currentColor" stroke-width="1.8" fill="none"/>
239      </svg>
240    </span>
241    <span class="checkout-text">Contact</span>
242  </a>
243</li>
244              
245
246 
247                 <li>
248  <a class="navbar-iconx" href="tel:02920 568 812">
249    <span class="checkout-svg-wrap">
250      <svg class="nav-iconx" viewBox="0 0 24 24">
251        <path d="M22 16.9v3a2 2 0 0 1-2.2 2
252                 19.8 19.8 0 0 1-8.6-3.1
253                 19.5 19.5 0 0 1-6-6
254                 19.8 19.8 0 0 1-3.1-8.7A2 2 0 0 1 4.1 2h3
255                 a2 2 0 0 1 2 1.7c.1.8.3 1.5.6 2.2
256                 a2 2 0 0 1-.5 2.1L8 9
257                 a16 16 0 0 0 6 6l1-1.2
258                 a2 2 0 0 1 2.1-.5c.7.3 1.4.5 2.2.6
259                 a2 2 0 0 1 1.7 2z"
260              stroke="currentColor" stroke-width="1.8" fill="none"/>
261      </svg>
262    </span>
263    <span class="checkout-text">02920 568 812</span>
264  </a>
265</li>
266                
267                
268                
269              </ul>
270            </div>
271          </div>
272        </div>
273      </nav>
274    </div>
275  </header>
276 
277 
278  
279
280<style>
281  html,body{
282overflow-x:hidden !important;
283}
284
285
286.itemNames {
287  
288   max-height: unset;
289}
290 
291h1, h2, h3, h4, h5, h6 {
292    font-family: 'Roboto', sans-serif;
293}
294
295/* @media (min-width: 340px){
296.funkyradio-default {
297    min-width: 107px;
298    width: inherit !important;
299}
300} */
301
302.funkyradio-default {
303    min-width: 107px;
304    width: inherit !important;
305}
306 
307.menuImageBlank {
308    width: 139px;
309    height: 117px;
310    display: inline-block;
311    vertical-align: top;
312    background: transparent;
313}
314
315.modalMenuDetails {
316    padding-left: 1px;
317    padding-right: 0;
318    padding-top: 2px;
319    padding-bottom: 5px;
320    flex-basis: 0;
321    -webkit-box-flex: 1;
322    -ms-flex-positive: 1;
323    flex-grow: 1;
324    max-width: 100%;
325    position: relative;
326    width: 95%;
327    min-height: 1px;
328    max-width: 230px;
329}
330 
331.texts {
332    display: table-row-group;
333    width: 80%;
334    text-align: center;
335}
336
337.pizzaRow{
338  display:flex;
339}
340
341.col-xs-4 {
342    width: 33.33333%;
343    margin: 0 auto;
344}
345.fa-remove:before, .fa-close:before, .fa-times:before {
346    color: #ff3f05;
347}
348
349.btn-menu{
350
351  transition: .3s ease-out;
352    text-transform: uppercase;
353    letter-spacing: 0em;
354    font-size: 12px;
355    font-weight: 500;
356    
357    padding: 10px 5px;
358 
359    /* padding: 30%; */
360    width: 100%;
361    display: block;
362    background: black;
363    border-radius: 0;
364 
365    border: none;
366    border-left: 2px solid white;
367     
368}
369
370 
371.mycolxs3{
372  width: 25%;
373  padding-left: 5px;
374  padding-right: 5px;
375}
376 
377/* overlay container */
378.info-modal {
379  position: fixed;
380  inset: 0;
381  display: none; /* hidden by default */
382  z-index: 9999;
383}
384
385/* dark dim background */
386.info-modal-backdrop {
387  position: absolute;
388  inset: 0;
389  background: rgba(0,0,0,0.65);
390}
391
392/* centred card */
393.info-modal-dialog {
394  position: relative;
395  margin: 60px auto;
396  max-width: 420px;
397  background: #161616;
398  color: #fff;
399  border-radius: 14px;
400  box-shadow: 0 18px 40px rgba(0,0,0,0.45);
401  padding: 20px 22px 18px;
402  z-index: 1;
403  border-top: 3px solid #ff3b30; /* red accent */
404}
405
406/* close button */
407.info-modal-close {
408  position: absolute;
409  top: 10px;
410  right: 14px;
411  border: none;
412  background: transparent;
413  color: #fff;
414  font-size: 26px;
415  line-height: 1;
416  cursor: pointer;
417}
418
419/* header */
420.info-modal-header {
421  margin-right: 26px; /* space for X */
422}
423
424.info-modal-header h2 {
425  margin: 0 0 4px;
426  font-size: 20px;
427  font-weight: 700;
428}
429
430.info-modal-header span {
431  display: inline-block;
432  font-size: 14px;
433  font-weight: 600;
434  color: #ffd75a;
435}
436
437/* body */
438.info-modal-body {
439  margin-top: 8px;
440  font-size: 14px;
441  line-height: 1.5;
442  color: #f3f3f3;
443  max-height: 260px;
444  overflow-y: auto;
445}
446
447/* optional: style your green (i) button a bit nicer */
448.info-btn {
449  background: #1bbf5c;
450  color: #fff;
451  border-radius: 50%;
452  width: 22px;
453  height: 22px;
454  border: none;
455  font-size: 14px;
456  line-height: 22px;
457  text-align: center;
458  cursor: pointer;
459}
460
461.funkyradio-success > input {
462    position: absolute;
463    opacity: 0;
464    width: 1px;
465    height: 1px;
466    margin: 0;
467    padding: 0;
468    top: 0;
469    left: 0;
470}
471
472.modal-content {
473    margin-top: 8px !important;
474    margin-bottom: 121px !important;
475}
476 
477
478 
479</style>
480 
481 
482<div id="myDiv1"></div>
483<div class="row mainrow" style="background:#000 url('https://rookcala.sirv.com/banner1.jpg') center center / cover no-repeat !important;">
484  <div class="filterButtons col-xs-12 col-lg-2 " style="border-radius: 3px;">
485    <div class="portfolioFilter  " style="z-index: 9; " id="fixedHeaderMenu">
486      <div class="portfolioFilter-inner" name="menus" id="innerdiv">
487        <div id="menuHeaders"></div>
488      </div>
489    </div>
490  </div>
491  <div class="container col-xs-12 col-lg-10 itemContainer" style="background: white !important; padding-bottom:80px;">
492    <div id="slider" class="carousels"></div>
493  </div>
494
495  <div class="bottomAndroidFix" style="    background-color: black;
496  display: -webkit-flex;
497  display: flex;
498  position: fixed;
499  left: 0;
500  /* top: 0; */
501  right: 0;
502  padding: 4px 0px;
503  height: 56px;
504  color: #2b2c2f;
505  z-index: 999;
506  bottom: 4%; display:none; " id="bottomAndroidFix">
507  
508  <div class="row" style="margin-left:-7px;">
509    <div class="col-xs-3 mycolxs3"><button class="btn btn-success btn-menu" onclick="location.href='/apphome?ios=android';">Home</button> </div>
510    <div class="col-xs-3 mycolxs3"><button class="btn btn-success btn-menu" onclick="location.href='/menu?ios=android';">Menu</button> </div>
511    <div class="col-xs-3 mycolxs3"><button class="btn btn-success btn-menu" onclick="location.href='/checkout?ios=android';">Checkout</button></div>
512    <div class="col-xs-3 mycolxs3"> <button class="btn btn-success btn-menu" onclick="location.href='/myprofile?ios=android';">Orders</button></div>
513  </div>
514</div>
515
516<style>
517
518/* Basic Reset */
519 
520
521/* Bubble Styles */
522/* Basic Reset */
523* {
524    margin: 0;
525    padding: 0;
526    box-sizing: border-box;
527}
528
529/* Bubble Styles */
530.discount-bubble {
531  border: 4px solid black;
532    position: fixed;
533    left: 20%;
534    top: 50%;
535    transform: translateY(-50%);
536    background-color: #FF5722;
537    color: white;
538    font-size: 18px;
539    font-weight: bold;
540    padding: 15px 17px;
541    /* border-radius: 10px 30px 10px 30px; */
542    display: flex;
543    align-items: center;
544    justify-content: center;
545    cursor: pointer;
546    transition: opacity 0.3s 
547ease;
548    z-index: 1000;
549    width: auto;
550    aspect-ratio: 1;
551    clip-path: polygon(100% 50%, 94.45% 57.04%, 97.55% 65.45%, 90.1% 70.43%, 90.45% 79.39%, 81.82% 81.82%, 79.39% 90.45%, 70.43% 90.1%, 65.45% 97.55%, 57.04% 94.45%, 50% 100%, 42.96% 94.45%, 34.55% 97.55%, 29.57% 90.1%, 20.61% 90.45%, 18.18% 81.82%, 9.55% 79.39%, 9.9% 70.43%, 2.45% 65.45%, 5.55% 57.04%, 0% 50%, 5.55% 42.96%, 2.45% 34.55%, 9.9% 29.57%, 9.55% 20.61%, 18.18% 18.18%, 20.61% 9.55%, 29.57% 9.9%, 34.55% 2.45%, 42.96% 5.55%, 50% 0%, 57.04% 5.55%, 65.45% 2.45%, 70.43% 9.9%, 79.39% 9.55%, 81.82% 18.18%, 90.45% 20.61%, 90.1% 29.57%, 97.55% 34.55%, 94.45% 42.96%);
552    /* clip-path: circle(47.9% at 52% 51%); */
553    /* text-indent: 21px; */
554    text-align: center;
555    max-width: 300px;
556}
557
558/* Hover effect */
559.discount-bubble:hover {
560    background-color: #FF3D00;
561}
562
563/* Content area styles */
564.content {
565    padding: 20px;
566    text-align: center;
567}
568
569.order-button {
570    background-color: #FF5722;
571    color: white;
572    padding: 15px 30px;
573    border: none;
574    border-radius: 5px;
575    cursor: pointer;
576}
577
578.order-button:hover {
579    background-color: #FF3D00;
580}
581/* Close button styles */
582.close-btn {
583  position: absolute;
584    top: 2%;
585    right: 47%;
586    background-color: transparent;
587    color: #181515;
588    font-size: 34px;
589    border: none;
590    cursor: pointer;
591    font-weight: bold;
592    z-index: 99999999999999999;
593}
594
595.close-btn:hover {
596    color: #FF3D00;
597}
598
599.discount-text{
600  font-size: 16px;
601  padding: 5px 7px;
602  line-height: 20px;
603  color:white;
604}
605
606
607.btn-closex{
608  width: 70px;
609}
610
611.icon-infoxx{
612  font-size: 14px;
613    /* right: 85px; */
614    top: bottom;
615    /* bottom: 16px; */
616    /* top: 321px; */
617    color: black;
618    /* z-index: 99999999999999999; */
619    /* width: 34px; */
620    /* height: 44px; */
621    color: green;
622    font-size: 19px;
623 
624}
625
626 
627/* Overlay can scroll when modal is tall */
628#invokeMyModal.modal {
629    overflow-y: auto;
630    padding-bottom: 80px; /* space above your bottom toolbar */
631}
632
633/* Base dialog width + horizontal centering */
634#invokeMyModal .modal-dialog {
635    width: 540px;
636    max-width: 98vw;
637    margin: 0 auto;
638}
639
640/* Mode 1: perfectly centered (for small modals) */
641#invokeMyModal .modal-dialog.modal-centered {
642    position: relative;
643    top: 50%;
644    transform: translateY(-50%);
645}
646
647/* Mode 2: stuck near top (for tall modals) */
648#invokeMyModal .modal-dialog.modal-top {
649    position: relative;
650    top: 35px;           /* small gap from top */
651    transform: none;
652    margin-bottom: 20px;
653}
654
655.funkyradio-success > input {
656    position: fixed;
657  
658}
659
660 body.modal-open {
661    overflow: hidden;
662    position: static !important;   /* most important */
663}
664#invokeMyModal.modal {
665    overflow-y: auto;
666    -webkit-overflow-scrolling: touch;
667}
668
669
670/* Lock header and make sure nothing overlaps it */
671 
672
673/* Make the slider NOT overlap upward */
674#my-slider, 
675.slider, 
676.home-slider, 
677.any-slider-class-you-use {
678    position: relative;
679    z-index: 1;
680    margin-top: 10px; /* prevents touching navbar */
681}
682
683/* Hard shield layer under navbar */
684.header-shield {
685    position: absolute;
686    top: 0;
687    left: 0;
688    width: 100%;
689    height: 70px;   /* match your header height */
690    z-index: 5000;
691    pointer-events: none;
692        /* background: #ff000066; */
693}
694
695   
696.rd-navbar-inner {
697  position: fixed;
698  top: 0;
699  left: 0;
700  right: 0;
701  z-index: 1000;
702  background: #000; /* or whatever your header bg is */
703}
704
705 #cartdivision {
706    position: fixed;
707    top: 0;
708    right: 0;
709    z-index: 5001;
710    display: flex;
711    align-items: end;
712    height: 100%;
713    padding-right: 10px;
714    height: 58px;
715    margin-top: -5px;
716    padding-top: 12px;
717}
718
719
720.rd-navbar-fixed .rd-navbar-panel {
721   
722    height: 58px;
723
724}
725
726.large-system-text #slider .itemNames {
727    font-size: 13px;
728}
729
730.large-system-text #slider .explainP {
731    font-size: 10.5px;
732    line-height: 1.2;
733}
734
735.large-system-text #slider .explainItem {
736    font-size: 11px;
737     line-height: 1.15;
738}
739
740.large-system-text #slider .icon-infoxx {
741    font-size: 14px;
742    margin-bottom: 4px;
743}
744
745.large-system-text .portfolioFilter a {
746    font-size: 11px;
747    line-height: 1.15;
748    padding: 3px 2px;
749}
750
751 
752
753.large-system-text #cartdivision {
754    
755      align-items: center !important;
756    transform: translateY(8px);
757}
758
759.large-system-text #cartdivision .basketClass {
760    display: inline-flex;
761    align-items: center;
762    height: 25px;
763    font-size: 11px;
764    line-height: 25px;
765    white-space: nowrap;
766}
767
768.large-system-text #cartdivision svg {
769    width: 25px;
770    height: 25px;
771}
772
773@media (max-width: 420px) {
774
775  /* Shopping Cart heading */
776  .large-system-text #popupModal .cartclass {
777    font-size: 20px;
778    line-height: 1.15;
779  }
780
781  /* Main red close button */
782  .large-system-text #popupModal .close_new2x {
783    width: 28px;
784    font-size: 42px;
785    line-height: 30px;
786  }
787
788  /* Basket summary under the title */
789  .large-system-text #popupModal .cartwrap {
790    margin-top: 5px;
791  }
792
793  .large-system-text #popupModal .cartwrap svg {
794    width: 23px;
795    height: 23px;
796  }
797
798  .large-system-text #popupModal #basketShow2 {
799    height: auto;
800    margin-top: 0;
801    font-size: 11px;
802    line-height: 23px;
803    white-space: nowrap;
804  }
805
806  /* Checkout button */
807  .large-system-text #popupModal .cartMainButtons {
808    height: 38px;
809    min-width: 0;
810    font-size: 12px;
811    line-height: 38px;
812  }
813
814  .large-system-text #popupModal .cartMainButtons .arrow {
815    font-size: 15px !important;
816  }
817
818  /* Reduce unnecessary space around cart items */
819  .large-system-text #popupModal .cartpopupitems {
820    padding: 4px 8px;
821  }
822
823  .large-system-text #popupModal .cart-item {
824    min-height: 0;
825    margin-bottom: 4px;
826    padding-bottom: 5px;
827  }
828
829  /* Product image */
830  .large-system-text #popupModal .cart-item-left {
831    width: 55px;
832  }
833
834  .large-system-text #popupModal .cartItemImages {
835    width: 50px;
836    height: 50px;
837    object-fit: contain;
838  }
839
840  /* Product name */
841  .large-system-text #popupModal .cartItemNames {
842    height: auto;
843    min-height: 0;
844    margin: 0 0 3px;
845    padding-right: 38px;
846    font-size: 11.5px;
847    line-height: 1.25;
848    overflow-wrap: anywhere;
849  }
850
851  /* Customisations and meal-deal contents */
852  .large-system-text #popupModal .itemOptions {
853    display: block;
854    width: auto;
855    height: auto;
856    min-height: 0;
857    margin: 0;
858    padding: 1px 0;
859    font-size: 10.5px;
860    line-height: 1.25;
861    overflow-wrap: anywhere;
862  }
863
864  /* Product Total and item price */
865  .large-system-text #popupModal .ptotal {
866    position: relative;
867    height: auto;
868    min-height: 16px;
869    margin: 4px 0 0 !important;
870    padding-right: 50px;
871    font-size: 10.5px;
872    line-height: 1.25;
873  }
874
875  .large-system-text #popupModal .ptotal span {
876    font-size: 11px;
877    line-height: 1.25;
878  }
879
880  /* Delete button */
881  .large-system-text #popupModal .close_new2 {
882    top: -4px;
883    padding: 2px;
884  }
885
886  .large-system-text #popupModal .cart-remove-icon {
887    width: 22px;
888    height: 22px;
889  }
890.large-system-text #popupModal .cart-item {
891    display: grid;
892    grid-template-columns: 55px minmax(0, 1fr);
893    align-items: center;
894    width: 100%;
895}
896
897.large-system-text #popupModal .cart-item-left,
898.large-system-text #popupModal .cart-item-right {
899    display: block;
900    width: auto;
901    min-width: 0;
902}
903
904.large-system-text #popupModal .ptotal {
905    display: grid;
906    grid-template-columns: 1fr auto;
907    width: 100%;
908    padding-right: 0;
909}
910
911.large-system-text #popupModal .ptotal span {
912    position: static !important;
913    float: none !important;
914    margin-left: 8px;
915    text-align: right !important;
916    margin-right:4px;
917}
918 
919}
920
921@media (max-width: 420px) {
922
923  /* Modal title */
924  .large-system-text #invokeMyModal .foodName {
925    height: auto;
926    min-height: 0;
927    padding: 7px 42px 7px 8px;
928    font-size: 17px;
929    line-height: 1.1;
930  }
931
932  /* Red close button */
933  .large-system-text #invokeMyModal .close_new2x {
934    top: 6px !important;
935    right: 8px;
936    width: 28px;
937    font-size: 42px;
938    line-height: 30px;
939  }
940
941  /* Keep three equal columns */
942  .large-system-text #invokeMyModal .modalMenuDetails {
943    width: 33.333%;
944    min-width: 0;
945    padding: 1px 2px 4px;
946  }
947
948  /* Salads / Sauces / Choose headings */
949  .large-system-text #invokeMyModal .sub-header {
950    display: flex;
951    align-items: center;
952    justify-content: center;
953    width: 100%;
954    height: auto;
955    min-height: 34px;
956    margin: 0 0 3px;
957    padding: 5px 2px;
958    border-width: 2px;
959    font-size: 11.5px;
960    line-height: 1.1;
961    overflow-wrap: anywhere;
962  }
963
964  /* Make every options column fit its available width */
965  .large-system-text #invokeMyModal .funkyradio,
966  .large-system-text #invokeMyModal .funkyradio-default,
967  .large-system-text #invokeMyModal .funkyradio-success {
968    width: 100% !important;
969    min-width: 0 !important;
970    max-width: 100%;
971  }
972
973  /* Individual modifier row */
974  .large-system-text #invokeMyModal
975  .funkyradio-success > label {
976    width: 100%;
977    height: auto !important;
978    min-height: 36px;
979    margin: 0;
980    padding: 3px 4px;
981    gap: 6px;
982    font-size: 9.5px;
983    line-height: 1.12;
984    overflow-wrap: anywhere;
985  }
986
987  /* Checkbox square */
988  .large-system-text #invokeMyModal
989  .funkyradio-success > label > .label-box {
990    position: relative;
991    left: 0 !important;
992    flex: 0 0 15px;
993    width: 15px !important;
994    height: 15px !important;
995    margin: 0;
996  }
997
998  /* Modifier text */
999  .large-system-text #invokeMyModal
1000  .funkyradio-success > label > .label-text {
1001    display: block;
1002    min-width: 0;
1003    margin-left: 0 !important;
1004    padding: 0 !important;
1005    font-size: inherit;
1006    line-height: inherit;
1007    text-align: left;
1008    overflow-wrap: anywhere;
1009  }
1010
1011  /* Remove extra Bootstrap table spacing */
1012  .large-system-text #invokeMyModal .table {
1013    margin-bottom: 0;
1014  }
1015
1016  .large-system-text #invokeMyModal .table td {
1017    padding: 1px 0;
1018  }
1019
1020  /* All Salads special button */
1021  .large-system-text #invokeMyModal .allsaladsdiv {
1022    width: 100%;
1023    height: auto !important;
1024    min-height: 34px;
1025    margin: 0 0 3px;
1026    padding: 0;
1027  }
1028
1029  .large-system-text #invokeMyModal .atexta {
1030    margin-left: 0 !important;
1031    font-size: 10.5px !important;
1032    text-align: left !important;
1033  }
1034
1035  /* Make it Meal — currently the worst broken element */
1036  .large-system-text #invokeMyModal .mmealdiv {
1037    width: 100%;
1038    height: auto !important;
1039    min-height: 42px;
1040    margin-top: 5px !important;
1041    padding: 0;
1042    overflow: visible;
1043  }
1044
1045  .large-system-text #invokeMyModal .saladclassxy {
1046    height: auto !important;
1047    min-height: 42px;
1048  }
1049
1050  .large-system-text #invokeMyModal .atextax {
1051    margin-left: 0 !important;
1052    padding: 2px 0 !important;
1053    font-size: 10.5px !important;
1054    line-height: 1.12;
1055    text-align: left !important;
1056  }
1057
1058  /* Slightly smaller footer */
1059  .large-system-text #invokeMyModal .wrapincs {
1060    margin-right: 20px !important;
1061  }
1062
1063  .large-system-text #invokeMyModal #addbtnxxx {
1064    width: 135px;
1065    height: 41px;
1066    padding: 8px 12px !important;
1067    font-size: 11px;
1068  }
1069
1070  .large-system-text #invokeMyModal .fa-icon-add2x:before {
1071    font-size: 23px;
1072  }
1073
1074  .large-system-text #invokeMyModal
1075.allsaladsdiv:not(.mmealdiv) {
1076    box-sizing: border-box;
1077    height: 34px !important;
1078    min-height: 34px;
1079}
1080
1081.large-system-text #invokeMyModal
1082.allsaladsdiv:not(.mmealdiv)
1083.funkyradio-success > label {
1084    box-sizing: border-box;
1085    height: 30px !important;
1086    min-height: 30px;
1087    padding-top: 2px;
1088    padding-bottom: 2px;
1089}
1090}
1091
1092@media (max-width: 420px) {
1093
1094  /* Meal-deal item rows */
1095  .large-system-text #invokeMyModal .steps {
1096    display: grid !important;
1097    grid-template-columns:
1098        24px
1099        minmax(0, 1fr)
1100        88px
1101        25px;
1102    align-items: center;
1103    gap: 4px;
1104    width: 100%;
1105    margin: 0 0 9px !important;
1106    padding: 0 4px;
1107  }
1108
1109  /* Override Bootstrap widths inside offer rows */
1110  .large-system-text #invokeMyModal
1111  .steps > .modalMenuDetails {
1112    width: auto !important;
1113    max-width: none;
1114    min-width: 0;
1115    margin: 0;
1116    padding: 0;
1117  }
1118
1119  /* 1, 2, 3... */
1120  .large-system-text #invokeMyModal .stepNumbers {
1121    width: auto !important;
1122    min-width: 0;
1123    padding: 0;
1124    font-size: 13px;
1125    line-height: 1;
1126    text-align: center;
1127  }
1128
1129  /* Item dropdown */
1130  .large-system-text #invokeMyModal .itemOffers {
1131    display: block;
1132    width: 100%;
1133    min-width: 0 !important;
1134    height: 36px;
1135    padding: 4px 6px !important;
1136    font-size: 10.5px;
1137    line-height: 1.1;
1138  }
1139
1140  /* Customize button */
1141  .large-system-text #invokeMyModal .steps .cxheader {
1142    display: flex;
1143    align-items: center;
1144    justify-content: center;
1145    width: 88px;
1146    height: 36px;
1147    min-height: 36px;
1148    margin: 0;
1149    padding: 4px;
1150    border: 0;
1151    font-size: 10.5px;
1152    line-height: 1;
1153    white-space: nowrap;
1154  }
1155
1156  /* Completed/customised indicator */
1157  .large-system-text #invokeMyModal
1158  .steps .fa-icon-steps {
1159    margin: 0;
1160  }
1161
1162  .large-system-text #invokeMyModal
1163  .steps .fa-icon-steps:before {
1164    font-size: 23px;
1165    margin: 0;
1166  }
1167
1168  /* Offer modal Add to Cart button */
1169  .large-system-text #invokeMyModal #addOfferButton {
1170    width: 135px;
1171    height: 41px;
1172    padding: 8px 12px !important;
1173    font-size: 11px;
1174  }
1175}
1176
1177@media (max-width: 420px) {
1178
1179  .large-system-text #invokeMyModal #mainStep {
1180    display: block !important;
1181    width: 100%;
1182    margin: 0 !important;
1183    padding: 0 5px;
1184  }
1185
1186  .large-system-text #invokeMyModal #mainStep .steps {
1187    float: none !important;
1188    clear: both;
1189    width: 100% !important;
1190    max-width: 100%;
1191    margin: 0 0 9px !important;
1192  }
1193}
1194
1195@media (max-width: 420px) {
1196
1197  .large-system-text #invokeMyModal .offer-step-row {
1198    display: grid !important;
1199    grid-template-columns:
1200        24px
1201        minmax(0, 1fr)
1202        86px
1203        24px !important;
1204    align-items: center;
1205    gap: 4px;
1206    width: 100% !important;
1207    max-width: 100%;
1208    margin: 0 0 9px !important;
1209    padding: 0 4px;
1210    float: none !important;
1211    clear: both;
1212  }
1213
1214  .large-system-text #invokeMyModal .offer-step-number {
1215    min-width: 0;
1216    padding: 0;
1217    font-size: 13px;
1218    line-height: 1;
1219    text-align: center;
1220  }
1221
1222  .large-system-text #invokeMyModal .offer-step-select {
1223    min-width: 0;
1224  }
1225
1226  .large-system-text #invokeMyModal
1227  .offer-step-select .itemOffers {
1228    display: block;
1229    width: 100%;
1230    min-width: 0 !important;
1231    height: 36px;
1232    padding: 4px 6px !important;
1233    font-size: 10.5px;
1234    line-height: 1.1;
1235  }
1236
1237  .large-system-text #invokeMyModal .offer-step-customize {
1238    min-width: 0;
1239  }
1240
1241  .large-system-text #invokeMyModal .offer-customize-button {
1242    display: flex;
1243    align-items: center;
1244    justify-content: center;
1245    width: 86px;
1246    height: 36px;
1247    margin: 0;
1248    padding: 4px;
1249    border: 0;
1250    border-radius: 2px;
1251    background: green;
1252    color: white;
1253    box-shadow: 0 1px 2px #777;
1254    font-family: inherit;
1255    font-size: 10.5px;
1256    line-height: 1;
1257    white-space: nowrap;
1258  }
1259
1260  .large-system-text #invokeMyModal .offer-step-status {
1261    display: flex;
1262    align-items: center;
1263    justify-content: center;
1264    min-width: 0;
1265  }
1266
1267  .large-system-text #invokeMyModal
1268  .offer-step-status .fa-icon-steps {
1269    margin: 0;
1270  }
1271
1272  .large-system-text #invokeMyModal
1273  .offer-step-status .fa-icon-steps:before {
1274    margin: 0;
1275    font-size: 22px;
1276  }
1277}
1278
1279.large-system-text #invokeMyModal
1280.offer-step-row.offer-step-hidden {
1281    display: none !important;
1282}
1283
1284@media (max-width: 420px) {
1285
1286  /* Customisation panel outer row */
1287  .large-system-text #invokeMyModal .stepOptions {
1288    box-sizing: border-box;
1289    width: 100%;
1290    margin-left: 0 !important;
1291    margin-right: 0 !important;
1292    padding: 0 5px;
1293  }
1294
1295  /* Rows generated inside prepareItem() */
1296  .large-system-text #invokeMyModal .stepOptions > .row {
1297    box-sizing: border-box;
1298    display: flex;
1299    width: 100%;
1300    margin-left: 0 !important;
1301    margin-right: 0 !important;
1302    gap: 4px;
1303  }
1304
1305  /* Equal-width customisation columns */
1306  .large-system-text #invokeMyModal
1307  .stepOptions > .row > .modalMenuDetails {
1308    flex: 1 1 0;
1309    width: 0 !important;
1310    max-width: none;
1311    min-width: 0;
1312    padding-left: 0;
1313    padding-right: 0;
1314  }
1315
1316  /* Green selected-item heading */
1317  .large-system-text #invokeMyModal .headersOffer {
1318    box-sizing: border-box;
1319    width: 100%;
1320    margin-left: 0;
1321    margin-right: 0;
1322  }
1323}
1324
1325/* Base Meal Deal rows — applies to normal web and app layouts */
1326#invokeMyModal .offer-step-row {
1327    display: grid;
1328    grid-template-columns:
1329        24px
1330        minmax(0, 1fr)
1331        92px
1332        25px;
1333    align-items: center;
1334    gap: 5px;
1335    width: 100%;
1336    margin: 0 0 10px;
1337    padding: 0 5px;
1338}
1339
1340#invokeMyModal .offer-step-number {
1341    min-width: 0;
1342    padding: 0;
1343    color: green;
1344    font-size: 14px;
1345    font-weight: 700;
1346    text-align: center;
1347}
1348
1349#invokeMyModal .offer-step-select {
1350    min-width: 0;
1351}
1352
1353#invokeMyModal .offer-step-select .itemOffers {
1354    display: block;
1355    width: 100%;
1356    min-width: 0;
1357    height: 40px;
1358    padding: 5px 7px;
1359    font-size: 12px;
1360}
1361
1362#invokeMyModal .offer-step-customize {
1363    min-width: 0;
1364}
1365
1366#invokeMyModal .offer-customize-button {
1367    display: flex;
1368    align-items: center;
1369    justify-content: center;
1370    width: 92px;
1371    height: 40px;
1372    margin: 0;
1373    padding: 5px;
1374    border: 0;
1375    border-radius: 3px;
1376    background: green;
1377    color: white;
1378    box-shadow: 0 1px 2px #777;
1379    font-family: inherit;
1380    font-size: 12px;
1381    line-height: 1;
1382    cursor: pointer;
1383}
1384
1385#invokeMyModal .offer-step-status {
1386    display: flex;
1387    align-items: center;
1388    justify-content: center;
1389    min-width: 0;
1390}
1391
1392#invokeMyModal .offer-step-status .fa-icon-steps {
1393    margin: 0;
1394}
1395
1396#invokeMyModal .offer-step-status .fa-icon-steps:before {
1397    margin: 0;
1398    font-size: 24px;
1399}
1400#invokeMyModal .offer-step-row.offer-step-hidden {
1401    display: none !important;
1402}
1403
1404@media (max-width: 420px) {
1405    html.extreme-system-text {
1406        -webkit-text-size-adjust: none !important;
1407        text-size-adjust: none !important;
1408    }
1409
1410    html.extreme-system-text body {
1411        -webkit-text-size-adjust: none !important;
1412        text-size-adjust: none !important;
1413    }
1414}
1415</style>
1416
1417 
1418<div class="discount-bubble" id="discount-bubble" style="display:none;">
1419  <div class="coverxx"><h1 class="discount-text" id="campaignText">  </h1>   <button class="btn-success btn-closex" id="close-btn" aria-label="Close discount message">Perfect
1420  </button></div>
1421</div>
1422
1423 
1424 
1425
1426      
1427<footer id="footer">
1428  <div class="footer-part     text-center"   >
1429    <span>
1430      <a onclick="window.open('/allergy', '_blank', 'location=no,height=570,width=320,scrollbars=yes,status=yes')" style="color:#fff;">Allergen Information</a>
1431    </span>
1432      
1433    <h6 style="color:red">Open 6 Days A Week. Monday is Closed</h6>
1434 
1435    <h6 style="color:white; font-size:16px; font-weight: 400;">Download our applications or use our webpage to place order.</h6>
1436<div class="rowff">
1437      <div class="col-xs-12"> <a class="btn btn-burnt-sienna btn-md btn-shape-circle offset-top-20 addButton navbar-icon thin-icon-house website" href="/menu">Menu</a> </div><div class="col-xs-6" style="text-align: right;">  <a href="https://play.google.com/store/apps/details?id=com.boost_it.yummiesplasmawr"><img src="https://rookcala.sirv.com/playStore.png"  style="height:43px;"></a></div><div class="col-xs-6" style="text-align: left;">  <a href="https://apps.apple.com/us/app/yummies-kebab-plasmawr/id1667749021"><img src="https://rookcala.sirv.com/appStore.png"  style="height:43px;"></a></div>  
1438</div>
1439    <div class="container">
1440      <div class="footer-inner">
1441        <div class="footer-info">
1442          <div class="brand-logo" style="margin-top:10px; margin-bottom:10px;">
1443              <img src="/sitelogo/sitelogo.png" height="60px" style="margin-bottom:6px;">
1444          </div>
1445          <p>56A Plas-Mawr Road,Fairwater,CF5 3JX</p>
1446          <p>
1447            <a href="tel:02920 568 812" style="font-size:14px;" id="shopTel">02920 568 812</a>
1448          </p>
1449        </div>
1450      </div>
1451      <div class="copy-right">
1452        <div class="row">
1453          <div class="col-md-12 col-sm-12 col-xs-12  text-center ">
1454            <span>
1455              <a onclick="window.open('/copyright', '_blank', 'location=no,height=570,width=320,scrollbars=yes,status=yes')">Copyright Yummies Fairwater All Rights Reserved.</a>
1456            </span>
1457            <br>
1458            <span>
1459              <a onclick="window.open('/terms', '_blank', 'location=no,height=570,width=320,scrollbars=yes,status=yes')" style="color:#fff;">Terms &amp; Conditions</a>
1460            </span><br>
1461            <span>
1462              <a onclick="window.open('/disclaimer', '_blank', 'location=no,height=570,width=320,scrollbars=yes,status=yes')" style="color:#fff;">Service Disclaimer</a>
1463            </span>
1464          </div>
1465        </div>
1466      </div>
1467    </div>
1468  </div>
1469  <div id="cookieConsent" style="position: fixed; bottom: 45px; background-color:  #272626; width: 100%; text-align: center; color:#fff;   font-weight: 400; display:none;"> 
1470    This website is using cookies for better browsing experience.<button class="cookieConsentOK"  style=" background: #822222; border: none; border-radius: 5px;">I agree.</button>
1471    <h>Click here for our  <a href="/terms">Cookie Policy</a></h>
1472</div>
1473</footer>
1474
1475  
1476     <div class="modal fade " id="popupModal" tabindex="-1" role="dialog" aria-labelledby="popupModal">
1477  <div class="modal-dialog modal-sm popupxx" role="dialog">
1478    <div class="modal-content" style="margin-top: 5%;  overflow: hidden;">
1479      <div class="modal-body modal-bodyxx popupbodyxx" style="background:white;">
1480        <button type="button" class="close_new2x" data-dismiss="modal" aria-label="Close" style="top: 10px;">  × </button>
1481        <div class="table-title" style="margin-bottom: 0px; margin-top:8px;">
1482          <h2 class="cartclass">Shopping Cart </h2>
1483
1484          <div class="cartwrap">  
1485         <svg width="30" height="30" viewBox="0 0 24 24" fill="none" stroke="green" stroke-width="2.0" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" style="margin-right:4px;">
1486  <circle cx="9" cy="21" r="1"></circle>
1487  <circle cx="20" cy="21" r="1"></circle>
1488  <path d="M1 1h4l2.7 13.4a2 2 0 0 0 2 1.6h8.9a2 2 0 0 0 1.9-1.4L23 6H6"></path>
1489</svg>
1490          <p id="basketShow2"   class="basketxyz"> </p>
1491        </div>
1492        </div>
1493        <div class="cart-wdrap" id="cart-blogs" style="margin-top:10px;">
1494          <div class="cart-blog row " id="cartPopUp" >
1495            <div class="cart-btn  col-xs-12" style=" margin-bottom: 20px;  width:100%;">
1496              <!-- <a href="javascript:;" onclick="clearCarts();" class="btn-black cartMainButtons"  >Clear Cart</a> -->
1497
1498
1499      
1500  <a href="/checkout"  class="btn-main cartMainButtons"> CHECK OUT  <span class="arrow">➜</span></a> 
1501
1502
1503            </div>
1504              <div class="cartpopupitems popupxyz" id="cartPopUpx"></div>
1505            </div>
1506        </div>
1507      </div>
1508    </div>
1509  </div>
1510</div>
1511
1512 
1513 
1514<div class="modal fade " id="optionmodal" tabindex="-1" role="dialog" aria-labelledby="optionmodal" style="z-index: 99999999999 !important;">
1515  <div class="modal-dialog modal-sm" role="dialog">
1516    <div class="modal-content" style="margin-top: 5%; padding:46px; background:transparent; border:none;">
1517      <div class="modal-body" style="background:white; margin-top: 3px !important;">
1518        <div class="cart-wdrap" id="optionsmenu">
1519        </div>
1520      </div>
1521    </div>
1522  </div>
1523</div>
1524
1525<div class="modal fade " id="loginModal" tabindex="-1" role="dialog" aria-labelledby="loginModal">
1526  <div class="modal-dialog modal-sm loginModalx" role="dialog">
1527    <div class="modal-content modal-contentx" style="margin-top: 30%;">
1528      <div class="modal-body modal-bodyx modal-logx" style=" padding: 2px 3px 3px 3px;">
1529        <button type="button" class="close_new fa fa-close" data-dismiss="modal" aria-label="Close"> </button>
1530        <div class="table-title">
1531          <h2 class="headersLog">Login</h2>
1532          <h6 class="heade-xs btn lpassword" onclick="lostPassword();" style="color:red; margin-bottom: -15px;" id="lostPasswordOpen">Lost your password ? Click Here</h6>
1533        </div>
1534        <form class="form" id="loginForms">
1535          <div class="row" id="loginForm">
1536
1537
1538           <div class="col-md-12 col-sm-12 col-xs-12" style="position:relative;">
1539
1540  <span class="icony">
1541    <svg viewBox="0 0 24 24">
1542      <rect x="3" y="5" width="18" height="14"></rect>
1543      <path d="M3 7l9 6 9-6"></path>
1544    </svg>
1545  </span>
1546
1547  <input type="text"
1548         name="username"
1549         placeholder="Your E-Mail"
1550         class="input-fields with-icon"
1551         id="username2"
1552         style="text-transform: lowercase;">
1553
1554</div>
1555
1556
1557      <div class="col-md-12 col-sm-12 col-xs-12" style="position:relative;">
1558
1559  <!-- LOCK ICON -->
1560  <span class="icony">
1561    <svg viewBox="0 0 24 24">
1562      <rect x="5" y="11" width="14" height="9"></rect>
1563      <path d="M8 11V8a4 4 0 0 1 8 0v3"></path>
1564    </svg>
1565  </span>
1566
1567  <!-- INPUT -->
1568  <input type="text"
1569         name="search"
1570         placeholder="Password"
1571         class="input-fields with-icon passfield"
1572         id="password2"
1573         onfocus="this.type='password'"
1574         autocorrect="off"
1575         autocapitalize="none">
1576
1577  <!-- EYE ICON -->
1578  <span class="eye-toggle" onclick="togglePasswordField(this)">
1579    <svg viewBox="0 0 24 24">
1580      <path d="M1 12s4-6 11-6 11 6 11 6-4 6-11 6-11-6-11-6z"/>
1581      <circle cx="12" cy="12" r="3"/>
1582    </svg>
1583  </span>
1584
1585</div>
1586
1587
1588
1589            
1590            <div class="or-left"></div><div class="or-right"></div>
1591            <div class="col-md-12 col-sm-12 col-xs-12" style="margin-top:8px;">
1592              <input type="submit" name="submit" class="btn-main submitButtons" value="Login" style=" width:100%; margin-bottom:18px;" id="loginButton1">
1593            </div>
1594
1595            <div class="or-seperatorx1" style="  margin: 16px 20px 0 20px !important; font-size:14px;"><i>New Customer? </i></div>
1596      
1597    
1598            <div class="col-xs-12  "  >
1599                  <a class="btn  registerB" href="#"  style="font-size:16px; margin-bottom:4px;" onclick="regModal();">  Register</a>
1600            </div>
1601
1602            
1603            <div class="col-md-12 col-sm-12 col-xs-12" id="socialLoginsx">
1604            <div class="or-seperator" style="margin-top:14px !important;"><i>or</i></div>
1605            <p class="text-center xxc" style="height:27px !important;">Login with your social media account</p>
1606            <div class="text-center social-btn">
1607              <div class="fb-login-button" data-width="" data-size="large" data-button-type="continue_with" data-layout="default" data-auto-logout-link="false" data-use-continue-as="false"></div>
1608
1609              
1610             <div id="appleid-signin" data-color="black" data-border="true" data-type="sign in"></div>
1611              
1611<script type="text/javascript" src="https://appleid.cdn-apple.com/appleauth/static/jsapi/appleid/1/en_US/appleid.auth.js"></script>
1611 
1612              
1613
1614                <a href="/auth/facebook" class="btn btn-primary"><i class="fa fa-facebook"></i>&nbsp; Facebook</a>
1615                <a href="/auth/google" class="btn btn-danger"><i class="fa fa-google-plus"></i>&nbsp; Google</a>
1616            </div>
1617
1618            <h1 class="terms" style="margin-top:10px;"> By logging via social platforms you accept the  <a onclick="termsconditions();">terms &amp; conditions</a></h1>
1619    
1620          </div>
1621          
1622          <!--  -->
1623          </div>
1624        </form>
1625      </div>
1626    </div>
1627  </div>
1628</div>
1629
1630<div class="modal fade " id="fgModal" tabindex="-1" role="dialog" aria-labelledby="fgModal">
1631  <div class="modal-dialog modal-sm modal-dialogx" role="dialog">
1632    <div class="modal-content modal-contentx" style="margin-top: 30%;">
1633      <div class="modal-body modal-bodyx" style=" padding: 2px 3px 3px 3px;">
1634        <button type="button" class="close_new fa fa-close" data-dismiss="modal" aria-label="Close"> </button>
1635        <form class="form" id="sendForgottenForm">
1636          <h2 class="heade-xs2">Please enter your email and follow the instructions</h2>
1637
1638          <div id="lostPassword">
1639
1640            <div class="col-md-12 col-sm-12 col-xs-12">
1641              <span class="icony">
1642    <svg viewBox="0 0 24 24">
1643      <rect x="3" y="5" width="18" height="14"></rect>
1644      <path d="M3 7l9 6 9-6"></path>
1645    </svg>
1646  </span> 
1647  
1648  
1649  <input type="text" name="email" placeholder="Your E-Mail" class="input-fields" id="forgetEmail">
1650            </div>
1651
1652
1653            <div class="col-md-12 col-sm-12 col-xs-12">
1654              <input type="submit" name="submit" class="btn-main submitButtons" value="Send Reset Link" style="width:100%;" id="resetlinkbutton">
1655            </div>
1656        </form>
1657        <form class="form" id="changefpassword">
1658          <div class="col-md-12 col-sm-12 col-xs-12">
1659            <h2 class="headersLogx">Enter the code sent to you by email or follow the link in the email to change your password</h2>
1660          </div>
1661          <div class="col-md-12 col-sm-12 col-xs-12">
1662                     <span class="icony">
1663    <svg viewBox="0 0 24 24">
1664      <rect x="3" y="5" width="18" height="14"></rect>
1665      <path d="M3 7l9 6 9-6"></path>
1666    </svg>
1667  </span> <input type="text" name="email" placeholder="Your E-Mail" class="input-fields" id="forgetEmailxx" required>
1668          </div>
1669          <div class="col-md-12 col-sm-12 col-xs-12">
1670            
1671           <span class="icony">
1672  <svg viewBox="0 0 24 24">
1673    <path d="M10 3L8 21"></path>
1674    <path d="M16 3L14 21"></path>
1675    <path d="M4 9h17"></path>
1676    <path d="M3 15h17"></path>
1677  </svg>
1678</span>
1679            
1680            <input type="text" name="number" placeholder="Reset Code" class="input-fields" id="resetcode" required>
1681          </div>
1682          <div class="col-md-12 col-sm-12 col-xs-12">
1683
1684
1685              <span class="icony">
1686    <svg viewBox="0 0 24 24">
1687      <rect x="5" y="11" width="14" height="9"></rect>
1688      <path d="M8 11V8a4 4 0 0 1 8 0v3"></path>
1689    </svg>
1690  </span>
1691            
1692            <input type="text" name="search" placeholder="Password" class="input-fields passfield" id="password1xx" onfocus="this.type='password'" autocorrect="off" autocapitalize="none" required> 
1693            
1694              <span class="eye-toggle" onclick="togglePasswordField(this)">
1695    <svg viewBox="0 0 24 24">
1696      <path d="M1 12s4-6 11-6 11 6 11 6-4 6-11 6-11-6-11-6z"/>
1697      <circle cx="12" cy="12" r="3"/>
1698    </svg>
1699  </span>
1700          </div>
1701          <div class="col-md-12 col-sm-12 col-xs-12">
1702             <span class="icony">
1703    <svg viewBox="0 0 24 24">
1704      <rect x="5" y="11" width="14" height="9"></rect>
1705      <path d="M8 11V8a4 4 0 0 1 8 0v3"></path>
1706    </svg>
1707  </span>
1708            
1709            
1710            <input type="text" name="search" placeholder="Confirm Password" class="input-fields passfield" id="verifypassword1xx" onfocus="this.type='password'" autocorrect="off" autocapitalize="none" required> 
1711            
1712             <span class="eye-toggle" onclick="togglePasswordField(this)">
1713    <svg viewBox="0 0 24 24">
1714      <path d="M1 12s4-6 11-6 11 6 11 6-4 6-11 6-11-6-11-6z"/>
1715      <circle cx="12" cy="12" r="3"/>
1716    </svg>
1717  </span>
1718
1719          </div>
1720          <div class="col-md-12 col-sm-12 col-xs-12" style="padding-bottom:20px;">
1721            <input type="submit" name="submit" class="btn-main submitButtons" value="Change Password" style="width:100%;" onclik="changefpassword();">
1722          </div>
1723        </form>
1724      </div>
1725    </div>
1726  </div>
1727</div>
1728</div>
1729
1730<div class="modal fade" id="appAlert" tabindex="-1" role="dialog" aria-labelledby="appAlert">
1731  <div class="modal-dialog modal-sm" role="dialog">
1732    <div class="modal-content" style="background: transparent; border: none;">
1733      <div class="modal-body" style="padding: 4px;">
1734        <div class="yes-no" style="min-height: 130px;">
1735          <h2 class="coolal-title" id="appAlertTitle"></h2>
1736          <p class="coolal-text" id="appAlertText"></p>
1737
1738          <div id="appAlertFooter" class="coolal-btnWrapper">
1739            <a href="javascript:;" class="coolal-yes" data-dismiss="modal">OK</a>
1740          </div>
1741        </div>
1742      </div>
1743    </div>
1744  </div>
1745</div>
1746
1747 
1748<div class="modal fade " id="iosAlert" tabindex="-1" role="dialog" aria-labelledby="iosAlert"> 
1749  <div class="modal-dialog modal-sm" role="dialog">
1750    <div class="modal-content" style="background: transparent; border:none;">
1751      <div class="modal-body" style=" padding: 2px 3px 3px 3px;  ">
1752        <div id="coolal" class="yes-no" style="height: 154px; opacity: 1; top: 0px;">
1753          <h2 class="coolal-title"id="titlex1"></h2>
1754          <p class="coolal-text" id="textx1">
1755          </p>
1756          <div id="coolal-btnWrapper" data-dismiss="modal" aria-label="Close"><a id="coolal-btn" class="coolal-yes-no coolal-yes" href="#" class="close_new fa fa-close" data-dismiss="modal" aria-label="Close">OK</a> </div>
1757        </div>
1758      </div>
1759    </div>
1760  </div>
1761</div>
1762
1763<div class="modal fade " id="iosAlertx" tabindex="-1" role="dialog" aria-labelledby="iosAlertx">
1764  <div class="modal-dialog modal-sm modal-dialogx" role="dialog">
1765    <div class="modal-content modal-contentx" style="background: transparent;">
1766      <div class="modal-body modal-bodyx" style=" padding: 2px 3px 3px 3px;">
1767        <div id="coolal" class="yes-no" style="height: 135px; opacity: 1; top: 0px;  height: max-content !important;">
1768          <h2 class="coolal-title" id="titlex"></h2>
1769          <p class="coolal-text" id="textx"></p>
1770          <div id="coolal-btnWrapperx">
1771            
1772          </div>
1773        </div>
1774      </div>
1775    </div>
1776  </div>
1777</div>
1778
1779      
1780
1781
1782<div class="modal fade " id="telephoneModal" tabindex="-1" role="dialog" aria-labelledby="telephoneModal">
1783  <div class="modal-dialog modal-sm modal-dialogx profileModalxx" role="dialog">
1784    <div class="modal-content modal-contentx contentxx">
1785      <div class="modal-body modal-bodyx modal-telx" style=" padding: 2px 3px 3px 3px;">
1786        <button type="button" class="close_new fa fa-close" data-dismiss="modal" aria-label="Close"> </button>
1787        <form id="telephoneForm">
1788          <div class="row">
1789
1790      
1791
1792            <div class="col-md-12 col-sm-12 table-titlex">
1793              <h6 class="heade-xs2" id="profilxtel">Please update your phone number and name in case we need to contact you regarding to your order</h6>
1794              <h6 class="heade-xs2" id="telxtel" style="display:none;">Update your phone number</h6>
1795            </div>
1796
1797            
1798 
1799
1800
1801            <div class="col-md-12 col-sm-12 col-xs-12" id="telephoneModalName">
1802               <label for="contactName3x" class="field-label">Name</label>
1803              <i class="fa fa-icon-name1 icon-classes-general"></i> <input type="text" name="contactName3x" placeholder="Name" class="input-fields" id="contactName3x" required>
1804              </div>
1805              <div class="col-md-12 col-sm-12 col-xs-12" style="margin-bottom:30px;">
1806                 <label for="telephone3x" class="field-label">Telephone</label>
1807                <i class="fa fa-icon-telephone1 icon-classes-general"></i> 
1808              <input type="tel" name="number3x" placeholder="Telephone (e.g. 07761 111111)" class="input-fields" id="telephone3x"  inputmode="tel" required >
1809              </div>
1810              <div class="col-md-12 col-sm-12 col-xs-12" style="margin-bottom:15px; margin-top:5px;">
1811                <input type="submit" name="submit" class="btn-main submitButtons" value="Save Changes" style="width:100%;"   required>
1812                <span class="validity"></span>
1813              </div>
1814            </div>
1815          
1816        </form>
1817      </div>
1818      </div>
1819    </div>
1820  </div>
1821 
1822
1823 
1824 
1825
1826<div class="modal fade " id="passChangeModal" tabindex="-1" role="dialog" aria-labelledby="passChangeModal">
1827  <div class="modal-dialog modal-sm modal-dialogx" role="dialog">
1828    <div class="modal-content modal-contentx">
1829      <div class="modal-body modal-bodyx" style=" padding: 2px 3px 3px 3px;">
1830        <button type="button" class="close_new fa fa-close" data-dismiss="modal" aria-label="Close"> </button>
1831        <div class="table-title">
1832          <h6 class="heade-xs2">Change your password</h6>
1833        </div>
1834        <form id="changePassForm">
1835          <div class="row">
1836            <div class="col-md-12 col-sm-12 col-xs-12">
1837              <div class="col-md-12 col-sm-12 col-xs-12">
1838                <label for="password3x" class="form-label form-label-outside chpassword">New Password </label>
1839                <input id="password3x" type="search" name="password" required pattern=".{5,30}" title="Min 5, Max 30 Characters" class="form-control"  autocomplete="off" onfocus="this.type='password'" autocorrect="off" autocapitalize="none">
1840              </div>
1841              <div class="col-md-12 col-sm-12 col-xs-12">
1842                <label for="retypex" class="form-label form-label-outside chpassword">Re-Type New Password </label>
1843                <input id="retypex" type="search" name="password" required pattern=".{5,30}" title="Min 5, Max 30 Characters" class="form-control" onfocus="this.type='password'" autocorrect="off" autocapitalize="none">
1844              </div>
1845              <div class="col-md-12 col-sm-12 col-xs-12" style="margin-bottom:25px; margin-top:20px;">
1846                <input type="submit" name="submit" class="btn-main submitButtons" value="Change Password" style="width:100%;" id="changesPassword" required>
1847                <span class="validity"></span>
1848              </div>
1849            </div>
1850          </div>
1851        </form>
1852      </div>
1853    </div>
1854  </div>
1855</div>
1856 
1857
1858<div class="modal fade " id="aboutUs" tabindex="-1" role="dialog" aria-labelledby="aboutUs">
1859  <div class="modal-dialog modal-sm modal-dialogx" role="dialog">
1860    <div class="modal-content modal-contentx">
1861      <div class="modal-body modal-bodyx" style=" padding: 2px 3px 3px 3px;">
1862        <button type="button" class="close_new fa fa-close" data-dismiss="modal" aria-label="Close"> </button>
1863        <div class="table-title">
1864          <h6 class="heade-xs2"></h6>
1865          <h6 class="heade-xs2">If you have any questions or inqueries please contact us.</h6>
1866        </div>
1867        <div class="row">
1868          <div class="col-md-12 col-sm-12 col-xs-12">
1869            <h6 class="heade-xs23">Opening Days</h6>
1870            <h6 class="heade-xs24" id="openingDays"> </h6>
1871          </div>
1872          <div class="col-md-12 col-sm-12 col-xs-12">
1873            <h6 class="heade-xs23">Phone</h6>
1874            <h6 class="heade-xs24" id="phoneShop">
1875              <li class="navbar-icon thin-icon-phonenav"></li> <a class="telclaz" href="callto:02920 568 812 ">
1876                02920 568 812
1877              </a>
1878            </h6>
1879          </div>
1880          <div class="col-md-12 col-sm-12 col-xs-12">
1881            <h6 class="heade-xs23">Address</h6>
1882            <h6 class="heade-xs24" id="shopAddressx"> </h6>
1883          </div>
1884          <div class="col-md-12 col-sm-12 col-xs-12" style="margin-bottom:20px;">
1885            <h6 class="heade-xs23">Promotions</h6>
1886            <h6 class="heade-xs24" id="promotions"> </h6>
1887          </div>
1888        </div>
1889      </div>
1890    </div>
1891  </div>
1892</div>
1893
1894<div class="modal fade " id="addressModal" tabindex="-1" role="dialog" aria-labelledby="addressModal">
1895  <div class="modal-dialog modal-sm modal-dialogx profileModalxx" role="dialog">
1896    <div class="modal-content modal-contentx contentxx">
1897      <div class="modal-body modal-bodyx modal-telx" style=" padding: 2px 3px 3px 3px;">
1898        <button type="button" class="close_new fa fa-close" data-dismiss="modal" aria-label="Close"> </button>
1899        <form id="addressForm3x">
1900          <div class="row">
1901            <div class="col-md-12 col-sm-12 table-titlex">
1902              <h6 class="heade-xs2">Please update your address and postcode for delivery</h6>
1903            </div>
1904             
1905            <div class="col-md-12 col-sm-12 col-xs-12">
1906              <i class="fa fa-icon-name1 icon-classes-general"></i> <input type="text" name="contactName2x" placeholder="Name" class="input-fields" id="contactName2x" required>
1907              </div>
1908              <div class="col-md-12 col-sm-12 col-xs-12">
1909                <i class="fa fa-icon-telephone1 icon-classes-general"></i>
1910
1911<input
1912  type="tel"
1913  name="number2x"
1914  placeholder="Telephone (e.g. 07761 111111)"
1915  class="input-fields"
1916  id="telephone2x"
1917  inputmode="tel"
1918  required
1919>
1920              </div>
1921              <div class="row" style="margin:0;" id="postcodeUpdate">
1922              <div class="col-md-12 col-sm-12 col-xs-12">
1923                <i class="fa fa-icon-address1 icon-classes-general"></i> <input type="text" name="address2x" placeholder="Address" class="input-fields" id="address2x" title="Between 2 -55 charachters" pattern=".{2,75}" required  oninvalid="this.setCustomValidity('Between 2-55 charachters')"
1924                onchange="try{setCustomValidity('')}catch(e){}">
1925              </div>
1926              
1927              <div class="col-md-12 col-sm-12 col-xs-12"  >
1928                <i class="fa fa-icon-postcode1 icon-classes-general"></i> <input type="text" name="postcode2x" placeholder="Postcode" class="input-fields" id="postcode2x" required   oninvalid="this.setCustomValidity('Use a valid postcode')"
1929                onchange="try{setCustomValidity('')}catch(e){}">
1930              </div>
1931              </div>
1932              <div class="col-md-12 col-sm-12 col-xs-12" style="margin-bottom:15px; margin-top:5px;">
1933                <input type="submit" name="submit" class="btn-main submitButtons" value="Save Changes" style="width:100%;" required>
1934                <span class="validity"></span>
1935              </div>
1936          
1937          </div>
1938        </form>
1939      </div>
1940    </div>
1941  </div>
1942</div>
1943
1944
1945<div class="modal fade " id="profileModal" tabindex="-1" role="dialog" aria-labelledby="profileModal">
1946  <div class="modal-dialog modal-sm modal-dialogx profileModalxx" role="dialog">
1947    <div class="modal-content modal-contentx contentxx">
1948      <div class="modal-body modal-bodyx" style=" padding: 2px 3px 3px 3px;">
1949        <button type="button" class="close_new fa fa-close" data-dismiss="modal" aria-label="Close"> </button>
1950        <div class="table-title">
1951          <h6 class="heade-xs2">View or change your details</h6>
1952          <h6 class="heade-xs2 " style="display:none;" id="addressWarning">Your delivery address seems incomplete. Please add your house/flat number or house name, then save your details.
1953</h6>
1954          <div class="col-md-12 col-sm-12 col-xs-12" style="margin-bottom:8px;" id="deleteAccountDiv">
1955            <input type="submit" name="submit" class="btn-main submitButtons" value="Delete my Account"   id="deleteAccount" onclick="deleteAccount();">
1956            <span class="validity"></span>
1957          </div>
1958          <h6 class="heade-xs2" id="email-xs2">Please use a valid email address if you would like to get order notifications</h6>
1959        </div>
1960   <form id="myProfileForm">
1961    <input type="hidden" id="profileAddressConfirmed" value="no">
1962  <div class="row">
1963    <div class="col-md-12 col-sm-12 col-xs-12">
1964
1965     <!-- NAME -->
1966<div class="col-md-12 col-sm-12 col-xs-12" id="profileModalName">
1967  <label for="name1x" class="field-label">Name</label>
1968
1969  <span class="iconx">
1970    <svg viewBox="0 0 24 24">
1971      <circle cx="12" cy="8" r="4"></circle>
1972      <path d="M4 20c0-4 4-6 8-6s8 2 8 6"></path>
1973    </svg>
1974  </span>
1975
1976  <input type="text" name="name" placeholder="Name"
1977         class="input-fields with-icon" id="name1x" required>
1978</div>
1979
1980<!-- EMAIL -->
1981<div class="col-md-12 col-sm-12 col-xs-12" id="profileModalEmail">
1982  <label for="email1x" class="field-label">Email</label>
1983
1984  <span class="iconx">
1985    <svg viewBox="0 0 24 24">
1986      <rect x="3" y="5" width="18" height="14"></rect>
1987      <path d="M3 7l9 6 9-6"></path>
1988    </svg>
1989  </span>
1990
1991  <input type="email" name="emails"
1992         placeholder="Your E-Mail ( [email protected] )"
1993         class="input-fields with-icon" id="email1x" required>
1994</div>
1995
1996<!-- TELEPHONE -->
1997<div class="col-md-12 col-sm-12 col-xs-12" id="profileModalTelephone">
1998  <label for="telephone1x" class="field-label">Telephone</label>
1999
2000  <span class="iconx">
2001    <svg viewBox="0 0 24 24">
2002    <path d="M22 16.9v3a2 2 0 0 1-2.2 2
2003                 19.8 19.8 0 0 1-8.6-3.1
2004                 19.5 19.5 0 0 1-6-6
2005                 19.8 19.8 0 0 1-3.1-8.7A2 2 0 0 1 4.1 2h3
2006                 a2 2 0 0 1 2 1.7c.1.8.3 1.5.6 2.2
2007                 a2 2 0 0 1-.5 2.1L8 9
2008                 a16 16 0 0 0 6 6l1-1.2
2009                 a2 2 0 0 1 2.1-.5c.7.3 1.4.5 2.2.6
2010                 a2 2 0 0 1 1.7 2z"></path>
2011    </svg>
2012  </span>
2013
2014<input
2015  type="tel"
2016  name="number"
2017  placeholder="Telephone (e.g. 07761 111111)"
2018  class="input-fields with-icon"
2019  id="telephone1x"
2020  inputmode="tel"
2021  required
2022>
2023</div>
2024
2025<!-- ADDRESS + POSTCODE -->
2026<div class="row" style="margin:0;" id="postcodeUpdate2">
2027
2028  <!-- ADDRESS -->
2029  <div class="col-md-12 col-sm-12 col-xs-12">
2030    <label for="address1x" class="field-label">Address</label>
2031
2032    <span class="iconx">
2033      <svg viewBox="0 0 24 24">
2034        <path d="M12 21s6-5.5 6-10a6 6 0 0 0-12 0c0 4.5 6 10 6 10z"></path>
2035        <circle cx="12" cy="11" r="2"></circle>
2036      </svg>
2037    </span>
2038
2039    <input type="text" name="address"
2040           placeholder="Address"
2041           class="input-fields with-icon"
2042           id="address1x"
2043           pattern=".{2,85}" required>
2044  </div>
2045
2046  <!-- POSTCODE -->
2047  <div class="col-md-12 col-sm-12 col-xs-12">
2048    <label for="postcode1x" class="field-label">Postcode</label>
2049
2050    <span class="iconx">
2051       <svg viewBox="0 0 24 24">
2052    <path d="M10 3L8 21"></path>
2053    <path d="M16 3L14 21"></path>
2054    <path d="M4 9h17"></path>
2055    <path d="M3 15h17"></path>
2056  </svg>
2057    </span>
2058
2059    <input type="text" name="postcode"
2060           placeholder="Postcode"
2061           class="input-fields with-icon"
2062           id="postcode1x" required>
2063  </div>
2064
2065</div>
2066
2067      <!-- EMAIL NOTIFICATIONS SWITCH (unchanged) -->
2068      <div class="col-md-12 col-sm-12 col-xs-12" style=" margin-top:15px;" id="profileModalNotifications">
2069        <label class="form-switch switchlabel">
2070          <input type="checkbox" id="emailswitch">
2071          <i></i>
2072          Email Notifications
2073        </label>
2074      </div>
2075
2076      <!-- SAVE BUTTON (unchanged) -->
2077      <div class="col-md-12 col-sm-12 col-xs-12" style="margin-bottom:15px;" id="saveChangesMyProfile">
2078        <input type="submit"
2079               name="submit"
2080               class="btn-main submitButtons"
2081               value="Save Changes"
2082               style="width:100%;"
2083               id="saveChanges"
2084               required>
2085        <span class="validity"></span>
2086      </div>
2087
2088    </div>
2089  </div>
2090</form>
2091
2092      </div>
2093    </div>
2094  </div>
2095</div>
2096
2097<div class="modal fade " id="contactModalx" tabindex="-1" role="dialog" aria-labelledby="contactModalx">
2098  <div class="modal-dialog modal-sm modal-dialogx" role="dialog">
2099    <div class="modal-content modal-contentx">
2100      <div class="modal-body modal-bodyx">
2101        <button type="button" class="close_new fa fa-close" data-dismiss="modal" aria-label="Close"> </button>
2102        <div class="table-title" style="padding:35px;">
2103          <h6 class="heade-xs2" style="font-size:18px;">If you have a problem or question about your order please call the shop</h6> 
2104          <h6 class="heade-xs2" style="font-size:20px; color:red;"> 02920 568 812 </h6>
2105 
2106        </div>
2107        <!-- <form id="contactForms">
2108          <div class="row">
2109            <div class="col-md-12 col-sm-12 col-xs-12">
2110              <h5 class="formInputsx">About*</h5> 
2111            </div>
2112            <div class="col-md-12 col-sm-12 col-xs-12">
2113              <i class="fa fa-icon-arrow-right icon-classes-general" style="top: 14px;"></i>
2114              <select class="timeSelectx input-fields" id="contactTitle" name="subject"  required>
2115              </select>
2116            </div>
2117            <div class="col-md-12 col-sm-12 col-xs-12">
2118              <i class="fa fa-icon-name1 icon-classes-general"></i> <input type="text" name="contactName" placeholder="Name" class="input-fields" id="contactName" required>
2119            </div>
2120            <div class="col-md-12 col-sm-12 col-xs-12">
2121              <i class="fa fa-icon-mailLog icon-classes-general"></i> <input type="email" name="email" placeholder="Your E-Mail ( [email protected])" class="input-fields" id="contactEmail" required>
2122            </div>
2123            <div class="col-md-12 col-sm-12 col-xs-12">
2124              <i class="fa fa-icon-telephone1 icon-classes-general"></i> <input type="tel" name="phone" placeholder="Telephone Ex(:0776 111 11 11)" class="input-fields" id="contactTelephone">
2125            </div>
2126            <div class="col-md-12 col-sm-12 col-xs-12" style="margin-top:10px;">
2127              <textarea placeholder="Your Message" id="messageCustomerx" name="message" required></textarea>
2128            </div>
2129            <div class="col-md-12 col-sm-12 col-xs-12" style="margin:16px 0;">
2130              <input type="submit" name="submit" class="btn-main submitButtons" value="Submit Message" style="width:100%;" id="saveChanges" required>
2131              <span class="validity"></span>
2132            </div>
2133            <input type="text" placeholder="Phone" name="address" class="inputlabels" value="" id="csAddress" style="display:none;" readonly>
2134            <input type="text" placeholder="Phone" name="postcode" class="inputlabels" value="" id="csPostcode" style="display:none;" readonly>
2135          </div>
2136        </form> -->
2137      </div>
2138    </div>
2139  </div>
2140</div>
2141
2142<div class="modal fade " id="messageModal" tabindex="-1" role="dialog" aria-labelledby="messageModal">
2143  <div class="modal-dialog modal-sm" role="dialog">
2144    <div class="modal-content" style="margin-top: 5%; max-width: 470px; overflow: hidden;">
2145      <div class="modal-body" style="background:white;">
2146        <button type="button" class="close_new fa fa-close" data-dismiss="modal" aria-label="Close"> </button>
2147        <div class="table-title" style="margin-bottom: 0px;">
2148          <div id="situation"></div>
2149          <div id="yourMessage"> </div>
2150          <div id="shopReply"></div>
2151          <div id="generic"></div>
2152        </div>
2153      </div>
2154    </div>
2155  </div>
2156</div>
2157
2158<div class="modal fade " id="termsModal" tabindex="-1" role="dialog" aria-labelledby="termsModal">
2159  <div class="modal-dialog modal-sm registerModalx termModalx" role="dialog">
2160    <div class="modal-content modal-contentx term-contentx">
2161      <div class="modal-body modal-bodyx" style=" padding: 2px 3px 3px 3px;">
2162        <button type="button" class="close_new fa fa-close" data-dismiss="modal" aria-label="Close"> </button>
2163        <div class="table-title">
2164          <h2 class="termsHeader" id="termheader"> </h2>
2165        </div>
2166          <div class="row" id="termsModalBody">
2167          </div>
2168      </div>
2169    </div>
2170  </div>
2171</div>
2172
2173
2174  
2175
2176<div class="modal fade " id="registerModal" tabindex="-1" role="dialog" aria-labelledby="registerModal">
2177  <div class="modal-dialog modal-sm registerModalx" role="dialog">
2178    <div class="modal-content modal-contentx">
2179      <div class="modal-body modal-bodyx" style=" padding: 2px 3px 3px 3px;">
2180        <button type="button" class="close_new fa fa-close" data-dismiss="modal" aria-label="Close"> </button>
2181        <div class="table-title">
2182          <h2 class="headersLog">Register</h2>
2183          <h6 class="heade-xs">Use a valid email and telephone number</h6>
2184        </div>
2185        <form id="registerForm">
2186          <div class="row">
2187              <div class="col-md-12 col-sm-12 col-xs-12">
2188                 <label for="name1" class="field-label">Name</label>
2189              <span class="iconr">
2190    <svg viewBox="0 0 24 24">
2191      <rect x="3" y="5" width="18" height="14"></rect>
2192      <path d="M3 7l9 6 9-6"></path>
2193    </svg>
2194  </span> <input type="text" name="name" placeholder="Name" class="input-fields" id="name1" required>
2195              </div>
2196
2197              <div class="col-md-12 col-sm-12 col-xs-12">
2198                 <label for="email1" class="field-label">Email</label>
2199               <span class="iconr">
2200    <svg viewBox="0 0 24 24">
2201      <rect x="3" y="5" width="18" height="14"></rect>
2202      <path d="M3 7l9 6 9-6"></path>
2203    </svg>
2204  </span><input type="email" name="emails" placeholder="Your E-Mail ( [email protected])" class="input-fields" id="email1" required>
2205              </div>
2206              <div class="col-md-12 col-sm-12 col-xs-12">
2207                 <label for="telephone1" class="field-label">Telephone</label>
2208
2209 <span class="iconr">  
2210                 <svg viewBox="0 0 24 24">
2211        <path d="M22 16.9v3a2 2 0 0 1-2.2 2
2212                 19.8 19.8 0 0 1-8.6-3.1
2213                 19.5 19.5 0 0 1-6-6
2214                 19.8 19.8 0 0 1-3.1-8.7A2 2 0 0 1 4.1 2h3
2215                 a2 2 0 0 1 2 1.7c.1.8.3 1.5.6 2.2
2216                 a2 2 0 0 1-.5 2.1L8 9
2217                 a16 16 0 0 0 6 6l1-1.2
2218                 a2 2 0 0 1 2.1-.5c.7.3 1.4.5 2.2.6
2219                 a2 2 0 0 1 1.7 2z"  ></path>
2220      </svg>
2221</span>
2222                
2223                
2224                
2225                <input type="tel" name="number" placeholder="Telephone Ex(:0776 111 11 11)" class="input-fields" id="telephone1"    required>
2226              </div>
2227              <div class="col-md-12 col-sm-12 col-xs-12">
2228    <label for="address1" class="field-label">Address</label>
2229    <i class="fa fa-icon-address1 icon-classes-general"></i> <input type="text" name="address" placeholder="Address" class="input-fields" id="address1" title="Between 2 -35 charachters" minlength="2" maxlength="35">
2230  </div>
2231  <div class="col-md-12 col-sm-12 col-xs-12">
2232    <label for="postcode1" class="field-label">Postcode</label>
2233    <i class="fa fa-icon-postcode1 icon-classes-general"></i> <input type="text" name="postcode" placeholder="Postcode" class="input-fields" id="postcode1">
2234  </div> 
2235              <div class="col-md-12 col-sm-12 col-xs-12">
2236                 <label for="password1" class="field-label">Password</label>
2237
2238
2239                <span class="iconr">
2240    <svg viewBox="0 0 24 24">
2241      <rect x="5" y="11" width="14" height="9"></rect>
2242      <path d="M8 11V8a4 4 0 0 1 8 0v3"></path>
2243    </svg>
2244  </span>
2245                
2246                <input type="text" name="search" placeholder="password" class="input-fields passfield" id="password1" onfocus="this.type='password'" autocorrect="off" autocapitalize="none" required> <span class="eye-toggler" onclick="togglePasswordField(this)">
2247    <svg viewBox="0 0 24 24">
2248      <path d="M1 12s4-6 11-6 11 6 11 6-4 6-11 6-11-6-11-6z"></path>
2249      <circle cx="12" cy="12" r="3"></circle>
2250    </svg>
2251  </span>
2252              </div>
2253              <div class="col-md-12 col-sm-12 col-xs-12" style="margin-bottom:27px;">
2254                 <label for="verifypassword1" class="field-label">Re-type Password</label>
2255              
2256     <span class="iconr">
2257    <svg viewBox="0 0 24 24">
2258      <rect x="5" y="11" width="14" height="9"></rect>
2259      <path d="M8 11V8a4 4 0 0 1 8 0v3"></path>
2260    </svg>
2261  </span>
2262  <input type="text" name="search" placeholder="confirm password" class="input-fields passfield" id="verifypassword1" onfocus="this.type='password'" autocorrect="off" autocapitalize="none" required> <span class="eye-toggler" onclick="togglePasswordField(this)">
2263    <svg viewBox="0 0 24 24">
2264      <path d="M1 12s4-6 11-6 11 6 11 6-4 6-11 6-11-6-11-6z"></path>
2265      <circle cx="12" cy="12" r="3"></circle>
2266    </svg>
2267  </span>
2268              </div>
2269              <div class="col-md-12 col-sm-12 col-xs-12"  >
2270                <input type="submit" name="submit" class="btn-main submitButtons" value="Register Now" style="width:100%;" id="registerButton" required>
2271                <span class="validity"></span>
2272              </div>
2273
2274              <div class="col-md-12 col-sm-12 col-xs-12" id="privacy">
2275              <!-- <h1 class="terms"> By registering you accept the <a onclick="window.open('/terms', '_blank', 'location=no,height=570,width=320,scrollbars=yes,status=yes')">terms &amp; conditions</a></h1> -->
2276                <h1 class="terms"> By registering you accept the  <a onclick="termsconditions();">terms &amp; conditions</a></h1></h1>
2277              </div>
2278          </div>
2279        </form>
2280      </div>
2281    </div>
2282  </div>
2283</div>
2284
2285
2286 
2287<!-- End Register -->
2288
2289  <div class="bottomAndroidFix" style="    background-color: black;
2290display: -webkit-flex;
2291display: flex;
2292position: fixed;
2293left: 0;
2294/* top: 0; */
2295right: 0;
2296padding: 4px 0px;
2297height: 56px;
2298color: #2b2c2f;
2299z-index: 999;
2300bottom: 4%; display:none; " id="bottomAndroidFix">
2301
2302    <div class="row" style="margin-left:-7px;">
2303      <div class="col-xs-3 mycolxs3"><button class="btn btn-success btn-menu" onclick="location.href='/apphome?ios=android';">Home</button> </div>
2304      <div class="col-xs-3 mycolxs3"><button class="btn btn-success btn-menu" onclick="location.href='/menu?ios=android';">Menu</button> </div>
2305      <div class="col-xs-3 mycolxs3"><button class="btn btn-success btn-menu" onclick="location.href='/checkout?ios=android';">Checkout</button></div>
2306      <div class="col-xs-3 mycolxs3"> <button class="btn btn-success btn-menu" onclick="location.href='/myprofile?ios=android';">Orders</button></div>
2307    </div>
2308  </div>
2309
2310
2311
2312  
2312<script src="https://cdn.trackjs.com/agent/v3/latest/t.js"></script>
2312
2313  
2313<script>
2314
2315    var ete = 0;
2316    window.TrackJS && TrackJS.install({
2317      token: "b611dee257d8438a80caa0c4dc74fa7d",
2318      application: "my-app-prod"
2319    });
2320  </script>
2320
2321
2322  
2322<script src="js/utils/core.min.js"></script>
2322
2323  
2323<script src="js/utils/scripts.js"></script>
2323
2324
2325
2326  <a href="#" class="top-arrow"></a>
2327
2328  
2328<script>
2329
2330    window.addEventListener('load', function () {
2331      try {
2332
2333  window.TrackJS && TrackJS.addMetadata("userx", "none");
2334
2335
2336  } catch (e) {
2337        // swallow – never let this kill the page
2338        console.log('TrackJS/init error', e);
2339      }
2340    });
2341
2342    function checkCookieConsent() {
2343      try {
2344        if (window.sessionStorage && sessionStorage.getItem('999') !== 'Cookies Ok') {
2345          $("#cookieConsent").show();
2346        }
2347      } catch (e) {
2348        // Storage not available – safest is just show banner and move on
2349        $("#cookieConsent").show();
2350      }
2351    }
2352
2353    function regModal() {
2354      $('#loginModal').modal('hide');
2355      $('#registerModal').modal('show');
2356    }
2357
2358    function ajaxHandler(typeA, urlA, sendData, callback) {
2359      $.ajax({
2360        type: typeA,
2361        url: urlA,
2362        data: sendData,
2363        error: function (response) { endEvent(); callback(response); },
2364        success: function (response) { },
2365        complete: function (response) { callback(response); }
2366      });
2367    }
2368
2369    $("#loginButton1x").click(function (e) {
2370      stopForm(e);
2371      var sendUrl = "/logMeIn2"; var sendData = {};
2372      sendData.username = ($("#username2y").val()).toLowerCase().trim();
2373      sendData.password = $("#passworda3y").val();
2374      ajaxHandler("POST", sendUrl, sendData, function (response) {
2375        if (response.responseText == "ACCESS") { window.location.reload(); }
2376        else if (response.responseText == "Password or Username is Wrong") { endEvent(); alertUser("Your password or email is wrong. Please try again or use forget password link."); }
2377        else { endEvent(); alertUser("There has been a problem. Please try again later."); }
2378      });
2379    });
2380
2381    $("#loginForms").submit(function (e) {
2382      stopForm(e);
2383      var sendUrl = "/logMeIn2"; var sendData = {};
2384      sendData.username = ($("#username2").val()).toLowerCase().trim();
2385      sendData.password = $("#password2").val();
2386      ajaxHandler("POST", sendUrl, sendData, function (response) {
2387        if (response.responseText == "ACCESS") { window.location.reload(); }
2388        else if (response.responseText == "Password or Username is Wrong") { endEvent(); alertUser("Your password or email is wrong. Please try again or use forget password link."); }
2389        else { endEvent(); alertUser("There has been a problem. Please try again later."); }
2390      });
2391    });
2392
2393    $(".icon-classes-generalx").click(function (e) {
2394      var pinput = $(this).parent().find('.passfield');
2395      //var pinput= $(this).next().find('.passfield');
2396      if ($(pinput).attr('type') == "password") {
2397        $(pinput).attr('type', 'text');
2398      }
2399      else {
2400        $(pinput).attr('type', 'password');
2401      }
2402    });
2403
2404    function appAlert(options) {
2405 
2406
2407  $('#appAlertTitle').text(options.title || '');
2408  $('#appAlertText').text(options.text || '');
2409
2410  var footerHtml = '';
2411
2412  if (options.buttons && options.buttons.length) {
2413    options.buttons.forEach(function (btn, i) {
2414      footerHtml += `
2415        <a href="javascript:;" 
2416           class="${btn.class || 'coolal-yes'}"
2417           data-btn-index="${i}">
2418           ${btn.text}
2419        </a>
2420      `;
2421    });
2422  } else {
2423    footerHtml = `<a href="javascript:;" class="coolal-yes" data-dismiss="modal">OK</a>`;
2424  }
2425
2426  $('#appAlertFooter').html(footerHtml);
2427
2428  // Attach actions
2429  $('#appAlertFooter a').off('click').on('click', function () {
2430    var index = $(this).data('btn-index');
2431    var btn = options.buttons && options.buttons[index];
2432
2433    $('#appAlert').modal('hide');
2434
2435    if (btn && typeof btn.action === 'function') {
2436      setTimeout(btn.action, 150);
2437    }
2438  });
2439
2440  $('#appAlert').modal('show');
2441}
2442
2443
2444  function deleteAccount() {
2445  appAlert({
2446    title: 'Delete Account',
2447    text: 'Are you sure you would like to proceed?',
2448    buttons: [
2449      {
2450        text: 'Cancel',
2451        class: 'coolal-nox'
2452      },
2453      {
2454        text: 'Remove',
2455        class: 'coolal-yesx',
2456        action: function () {
2457          deleteAccountx();
2458        }
2459      }
2460    ]
2461  });
2462}
2463
2464    function deleteAccountx() {
2465      var sendUrl = "/deleteAccount"; var sendData = {};
2466      //$('#iosAlertx').modal('hide');
2467
2468      ajaxHandler("GET", sendUrl, "", function (response) {
2469        if (response.responseText == "error") { alertUser("An error occured. Please try again."); }
2470
2471        else if (response.responseText == "neworder") {
2472          alertUser("You have recently placed an order, you can not delete your account until you have a live order. Wait until it is completed by the shop. Thanks");
2473          return;
2474        }
2475        else {
2476          alertUser("Your account has been deleted however we have to keep some data for legal requirements related to your account for a certain period time. We would like to remind you that we do not share, sell or use your data for any purposes with any 3rd party.");
2477          setTimeout(function () {
2478            window.location.reload();
2479          }, 3000);
2480        }
2481      });
2482    }
2483    $("#contactForms").submit(function (e) {
2484      stopForm(e);
2485      var fields = $(this).serializeArray();
2486      var sendUrl = "/contact";
2487      ajaxHandler("POST", sendUrl, fields, function (response) {
2488        if (response.responseText == "Sent") { $('#mainWrapper').html("<h1 style='font-size:16px; padding:80px; 35px; height:500px;'>Your message has been sent.We aim to reply you within 24 hours.If it is an urgent issue please call shop. </h1>"); alertIos("Sent", "Your message has been successfully sent. Check your email or here for replies."); $('#contactModalx').modal('hide'); endEvent(); }
2489        else if (response.responseText == "Too Early") { alertUser("You have sent a message recently. You can only send one message in every 5 minutes"); endEvent(); }
2490        else { endEvent(); alertUser("There has been a problem. Please try again later."); }
2491      });
2492    });
2493
2494    $("#formPasswordReset").submit(function (e) {
2495      stopForm(e);
2496      var sendData = {};
2497      var sendUrl = '/resetPassword';
2498      sendData.password = $("#password3").val();
2499      sendData.verifypassword = $("#retype").val();
2500      sendData.username = $("#userEmail").val();
2501      sendData.token = $("#token").val();
2502      if (sendData.password != sendData.verifypassword) {
2503        $("#ajaxMessage3").text("Passwords do not match").fadeIn("slow").delay(1500).fadeOut("slow");
2504        document.getElementById("retype").style.background = "red";
2505        endEvent();
2506        return;
2507      }
2508      ajaxHandler("POST", sendUrl, sendData, function (response) {
2509        if (response.responseText == "success") { window.location.href = "/"; }
2510        else if (response.responseText == "Expired") { alertUser("Your Token Has Been Expired, Please demand a new one."); }
2511        else { alertUser("An error occured please try again;"); }
2512        endEvent();
2513      });
2514    });
2515
2516    $("#sendForgottenForm").submit(function (e) {
2517      stopForm(e);
2518      var sendData = {}; sendData.email = $("#forgetEmail").val().toLowerCase();
2519      var sendUrl = "/forgetPassword";
2520      ajaxHandler("POST", sendUrl, sendData, function (response) {
2521        if (response.responseText == "successfull") {
2522          $("#forgotPass2").html("Please check your email for further instructions. Also check your spam folder.").show().css('color', 'green');
2523          $('#resetlinkbutton').val("Email Sent").css('background', 'green');
2524          alertUser("<h1 style='margin-bottom:-70px;'>Success</h1> <h2 style='color:green; font-size: 20px; padding: 0 25px;'>Password reset email is sent to the registered email address. Please check your email for instructions. Please also check your spam folder as well</h2>");
2525        }
2526        else {
2527          alertUser("The email you entered  does not exist or you need to wait 6 minutes between each email request");
2528          $('#resetlinkbutton').val("Send Reset Link").css('background', '#DC4C46');
2529          endEvent(e);
2530        }
2531      });
2532    });
2533
2534    function checkEmail(emailValue) {
2535      var sendUrl = "/checkEmail";
2536      var sendData = {}; sendData.email = emailValue;
2537      ajaxHandler("POST", sendUrl, sendData, function (response) {
2538        if (response.responseText == 'exist') { alertUser("This email is used before,use a different one"); }
2539      });
2540    }
2541
2542    function isSuspiciousAddress(address, postcode) {
2543  if (!address) return true;
2544
2545  var cleanAddr = address.trim().toUpperCase();
2546  var cleanPc = (postcode || "")
2547    .trim()
2548    .toUpperCase()
2549    .replace(/\s+/g, "");
2550
2551  var compactAddr = cleanAddr.replace(/\s+/g, "");
2552  var hasDigit = /\d/.test(cleanAddr);
2553  var containsPostcode =
2554    cleanPc && compactAddr.indexOf(cleanPc) !== -1;
2555
2556  return !hasDigit || containsPostcode;
2557}
2558
2559
2560
2561    function sendRegisterAjax(data) {
2562      var sendUrl = "/register";
2563      ajaxHandler("POST", sendUrl, data, function (response) {
2564        if (response.status == 429) {
2565          alertNow("You have created too many accounts from this ip, please try again after an hour", endEvent);
2566          return;
2567        }
2568
2569        if (response.responseText == 'success') {
2570          alertNow("You have successfully registered", function () {
2571            window.location.reload();
2572          });
2573        }
2574        else if (response.responseText == "Email used before") {
2575          alertNow("Your email is registered before. Please use forget password link or try different email.", endEvent);
2576        }
2577        else {
2578          alertNow("There has been a problem. Please try again later.", endEvent);
2579        }
2580      });
2581    }
2582
2583    function validateProfilePostcodeAndAddressThenUpdate(data) {
2584      var rawPostcode = (data.postcode || "").trim();
2585
2586      if (!rawPostcode) {
2587        alertUser("Please enter your postcode");
2588        endEvent();
2589        return;
2590      }
2591
2592      var roughPattern = /^[A-Z]{1,2}\d[A-Z\d]?\s*\d[A-Z]{2}$/i;
2593      if (!roughPattern.test(rawPostcode)) {
2594        alertUser("Your postcode doesn't look right. Please check it.");
2595        endEvent();
2596        return;
2597      }
2598
2599      var url = "https://api.postcodes.io/postcodes/" + encodeURIComponent(rawPostcode);
2600
2601      $.ajax({
2602        url: url,
2603        method: "GET",
2604        dataType: "json",
2605        timeout: 7000
2606      })
2607
2608        // ---------- 200 OK ----------
2609        .done(function (resp, status, xhr) {
2610          if (resp && resp.status === 200 && resp.result && resp.result.postcode) {
2611            var formattedPc = resp.result.postcode;
2612            data.postcode = formattedPc;
2613            $('#postcode1x').val(formattedPc);
2614
2615            if (data.addressConfirmed) {
2616              $('#addressConfirmed').val("1");
2617              sendProfileUpdateAjax(data);
2618              return;
2619            }
2620
2621            if (isSuspiciousAddress(data.address, formattedPc)) {
2622              var typedAddr = data.address || "";
2623   fetchAddressSuggestionsFromServer(formattedPc, typedAddr, function (suggestions) {
2624  showAddressIssueModal(
2625    "YOUR ADDRESS IS INCOMPLETE.\n\n" +
2626    "We cannot deliver your order without a house/flat number or house name and postcode.\n\n" +
2627    "Please select your complete address below or press Edit address.",
2628
2629    suggestions,
2630
2631    function onPick(addr) {
2632
2633      const parts = addr.split(',').map(p => p.trim());
2634      const shortAddress = parts.slice(0, 2).join(', ');
2635
2636      $('#address1x').val(shortAddress);
2637      $('#profileAddressConfirmed').val('yes');
2638
2639      data.address = shortAddress;
2640      data.addressConfirmed = true;
2641
2642      sendProfileUpdateAjax(data);
2643    },
2644
2645    null, // Do not allow an incomplete address to be used
2646
2647    function onEdit() {
2648      $('#address1x').focus();
2649      endEvent();
2650    }
2651  );
2652});
2653            } else {
2654              sendProfileUpdateAjax(data);
2655            }
2656            return;
2657          }
2658          sendProfileUpdateAjax(data);
2659        })
2660
2661        // ---------- FAIL (404 / 0 / others) ----------
2662        .fail(function (xhr, status, error) {
2663          if (xhr.status === 404) {
2664            var typedPc = rawPostcode;
2665            var typedAddr = data.address || "";
2666
2667            fetchAddressSuggestionsFromServer(typedPc, typedAddr, function (suggestions) {
2668              showAddressIssueModal(
2669                "We couldn't find this postcode.\n\n" +
2670                "Please pick a suggested address below or edit your address.",
2671                suggestions,
2672            function onPick(addr) {
2673  const parts = addr.split(',').map(p => p.trim());
2674  const shortAddress = parts.slice(0, 2).join(', ');
2675
2676  $('#address1x').val(shortAddress);
2677  $('#profileAddressConfirmed').val('yes');
2678
2679  data.address = shortAddress;
2680  data.addressConfirmed = true;
2681
2682  sendProfileUpdateAjax(data);
2683},
2684                function onUseTyped() {
2685                  $('#profileAddressConfirmed').val('yes');
2686                  data.addressConfirmed = true;
2687                  sendProfileUpdateAjax(data);
2688                },
2689                function onEdit() {
2690                  $('#address1x').focus();
2691                  endEvent();
2692                }
2693              );
2694            });
2695            return;
2696          }
2697
2698          // 0 – network
2699          if (xhr.status === 0) {
2700            if (isSuspiciousAddress(data.address, data.postcode) && !data.addressConfirmed) {
2701              showAddressIssueModal(
2702                "This address looks incomplete (e.g. missing house/flat number).\n\n" +
2703                "Please edit or continue with what you typed.",
2704                [],
2705                function onPick() {
2706                  sendProfileUpdateAjax(data);
2707                },
2708                function onUseTyped() {
2709                  $('#profileAddressConfirmed').val('yes');
2710                  data.addressConfirmed = true;
2711                  sendProfileUpdateAjax(data);
2712                },
2713                function onEdit() {
2714                  $('#address1x').focus();
2715                  endEvent();
2716                }
2717              );
2718            } else {
2719              sendProfileUpdateAjax(data);
2720            }
2721            return;
2722          }
2723          sendProfileUpdateAjax(data);
2724        });
2725    }
2726
2727//profile update
2728    function sendProfileUpdateAjax(data) {
2729      var sendUrl = "/updateInformation";
2730      ajaxHandler("POST", sendUrl, data, function (response) {
2731        if (response.responseText == "Email Same") {
2732          alertUser("Your email  is registered before. Please use forget password link or try  different email.");
2733          endEvent();
2734          return;
2735        }
2736        else if (response.responseText == "error") {
2737          endEvent();
2738          alertUser("There has been a problem. Please try again later.");
2739          return;
2740        }
2741        try {
2742          var y = response.responseJSON;
2743          $('#getDistance').val(y.distance);
2744          $('#profileModal').modal('hide');
2745          alertIos("Success", "You have updated your information");
2746          updateC(data);
2747          endEvent();
2748          return;
2749        } catch (e) {
2750          endEvent();
2751          alertUser("There has been a problem. Please try again later.");
2752          return;
2753        }
2754      });
2755    }
2756
2757     
2758    $('#address1x, #postcode1x').on('input', function () {
2759      $('#profileAddressConfirmed').val('no');
2760    });
2761
2762    function getValidTelephone(inputSelector) {
2763
2764      console.log("input selector",inputSelector);
2765  var telephone = ($(inputSelector).val() || '').trim();
2766
2767  // Remove spaces, brackets, dots and hyphens
2768  telephone = telephone.replace(/[\s().-]/g, '');
2769
2770  // Convert 00 international prefix into +
2771  if (telephone.indexOf('00') === 0) {
2772    telephone = '+' + telephone.substring(2);
2773  }
2774
2775  // Convert UK +44 into leading 0
2776  if (telephone.indexOf('+44') === 0) {
2777    telephone = '0' + telephone.substring(3);
2778  }
2779
2780  var validUkNumber = /^0\d{10}$/.test(telephone);
2781  var validInternationalNumber =
2782    /^\+[1-9]\d{7,14}$/.test(telephone);
2783
2784  if (!validUkNumber && !validInternationalNumber) {
2785    alertUser(
2786      'Please enter an 11-digit UK number (e.g. 07761111111), or an international number including the country code (e.g. +447761111111).'
2787    );
2788
2789    $(inputSelector).focus();
2790    endEvent();
2791
2792    return false;
2793  }
2794
2795  return telephone;
2796}
2797
2798    $("#myProfileForm").submit(function (e) {
2799      stopForm(e);
2800      var data = {};
2801      data.name = $('#name1x').val();
2802      data.email = ($('#email1x').val() || "").toLowerCase();
2803      data.address = $('#address1x').val();
2804      data.postcode = $('#postcode1x').val();
2805      data.telephone = getValidTelephone('#telephone1x');
2806if (!data.telephone) {
2807  endEvent();
2808  return;
2809}
2810      data.addressConfirmed = ($('#profileAddressConfirmed').val() === 'yes');
2811
2812      if (!data.address || data.address.length < 2) {
2813        alertUser("Your address should have more than  2 characters");
2814        endEvent();
2815        return;
2816      }
2817      if (!data.postcode || data.postcode.length < 4) {
2818        alertUser("Your postcode should have more than  4 characters");
2819        endEvent();
2820        return;
2821      }
2822      var emailMe = $('#emailswitch').prop("checked");
2823      data.emailOrder = emailMe ? 1 : 0;
2824      validateProfilePostcodeAndAddressThenUpdate(data);
2825    });
2826
2827    function validatePostcodeAndAddressThenRegister(data) {
2828
2829      console.log("test");
2830      var rawPostcode = (data.postcode || "").trim();
2831      if (!rawPostcode) {
2832        alertNow("Please enter your postcode", endEvent);
2833        return;
2834      }
2835      var roughPattern = /^[A-Z]{1,2}\d[A-Z\d]?\s*\d[A-Z]{2}$/i;
2836      if (!roughPattern.test(rawPostcode)) {
2837        alertNow("Your postcode doesn't look right. Please check it.", endEvent);
2838        return;
2839      }
2840
2841      var url = "https://api.postcodes.io/postcodes/" + encodeURIComponent(rawPostcode);
2842      $.ajax({
2843        url: url,
2844        method: "GET",
2845        dataType: "json",
2846        timeout: 5000
2847      })
2848        .done(function (resp, status, xhr) {
2849          if (resp && resp.status === 200 && resp.result && resp.result.postcode) {
2850            var formattedPc = resp.result.postcode;
2851            data.postcode = formattedPc;
2852            $('#postcode1').val(formattedPc);
2853            if (data.addressConfirmed) {
2854              sendRegisterAjax(data);
2855              return;
2856            }
2857            if (isSuspiciousAddress(data.address, formattedPc)) {
2858              var typedAddr = data.address || "";
2859              fetchAddressSuggestionsFromServer(formattedPc, typedAddr, function (suggestions) {
2860                showAddressIssueModal(
2861                  "This address looks incomplete (e.g. missing house/flat number).\n\n" +
2862                  "Please pick one of the suggestions below or edit your address.",
2863                  suggestions,
2864                  function onPick(addr) {
2865
2866                        const parts = addr.split(',').map(p => p.trim());
2867      const shortAddress = parts.slice(0, 2).join(', ');
2868                    $('#address1').val(shortAddress);
2869                    data.address = shortAddress;
2870                    sendRegisterAjax(data);
2871                  },
2872                  function onUseTyped() {
2873                    sendRegisterAjax(data);
2874                  },
2875                  function onEdit() {
2876                    $('#address1').focus();
2877                    endEvent();
2878                  }
2879                );
2880              });
2881            } else {
2882              sendRegisterAjax(data);
2883            }
2884            return;
2885          }
2886          sendRegisterAjax(data);
2887        })
2888
2889        .fail(function (xhr, status, error) {
2890          if (xhr.status === 404) {
2891            var typedPc = rawPostcode;
2892            var typedAddr = data.address || "";
2893
2894            fetchAddressSuggestionsFromServer(typedPc, typedAddr, function (suggestions) {
2895              showAddressIssueModal(
2896                "We couldn't find this postcode.\n\n" +
2897                "Please pick a suggested address below or edit your address.",
2898                suggestions,
2899                function onPick(addr) {
2900
2901                   const parts = addr.split(',').map(p => p.trim());
2902      const shortAddress = parts.slice(0, 2).join(', ');
2903
2904
2905                  $('#address1').val(shortAddress);
2906                  data.address = shortAddress;
2907                  sendRegisterAjax(data);
2908                },
2909                function onUseTyped() {
2910                  sendRegisterAjax(data);
2911                },
2912                function onEdit() {
2913                  $('#address1').focus();
2914                  endEvent();
2915                }
2916              );
2917            });
2918            return;
2919          }
2920
2921          if (xhr.status === 0) {
2922            if (isSuspiciousAddress(data.address, data.postcode)) {
2923              showAddressIssueModal(
2924                "This address looks incomplete (e.g. missing house/flat number).\n\n" +
2925                "Please edit or continue with what you typed.",
2926                [],
2927                function onPick() {
2928                  sendRegisterAjax(data);
2929                },
2930                function onUseTyped() {
2931                  sendRegisterAjax(data);
2932                },
2933                function onEdit() {
2934                  $('#address1').focus();
2935                  endEvent();
2936                }
2937              );
2938            } else {
2939              sendRegisterAjax(data);
2940            }
2941            return;
2942          }
2943          sendRegisterAjax(data);
2944        });
2945    }
2946function togglePasswordField(el) {
2947  var input = $(el).siblings('input').first();
2948
2949  if (!input.length) return;
2950
2951  if (input.attr('type') === 'password') {
2952    input.attr('type', 'text');
2953  } else {
2954    input.attr('type', 'password');
2955  }
2956}
2957    function fetchAddressSuggestionsFromServer(postcode, typedAddress, cb) {
2958      $.getJSON('/address-suggestions', {
2959        postcode: postcode,
2960        address: typedAddress
2961      })
2962        .done(function (res) {
2963          if (res && Array.isArray(res.suggestions)) {
2964            cb(res.suggestions);
2965          } else {
2966            cb([]);
2967          }
2968        })
2969        .fail(function (xhr, status, error) {
2970          cb([]);
2971        });
2972    }
2973
2974    $("#registerForm").submit(function (e) {
2975      stopForm(e);
2976
2977      var data = {};
2978      data.name = $('#name1').val();
2979      data.username = ($('#email1').val() || "").toLowerCase();
2980      data.password = $('#password1').val();
2981      data.verifypassword = $('#verifypassword1').val();
2982      data.address = $('#address1').val();
2983      data.postcode = $('#postcode1').val();
2984      
2985      data.telephone = getValidTelephone('#telephone1');
2986if (!data.telephone) {
2987  endEvent();
2988  return;
2989}
2990
2991$('#telephone1').val(data.telephone);
2992
2993
2994
2995      if (data.password.length < 5) {
2996        alertNow("Your password can not be lower than 5 characters", endEvent);
2997        return;
2998      }
2999
3000      if (data.password != data.verifypassword) {
3001        alertNow("Passwords don't match", endEvent);
3002        return;
3003      }
3004
3005      if (!data.address || data.address.length < 2) {
3006        alertNow("Your address should have more than 2 characters", endEvent);
3007        return;
3008      }
3009      validatePostcodeAndAddressThenRegister(data);
3010    });
3011
3012    function updateC(data) {
3013      $('#customerName').val(data.name);
3014      $('#emailCustomer').val(data.email);
3015      $('#telCustomer').val(data.telephone);
3016      $('#addressCustomer').val(data.address);
3017      $('#postcodeCustomer').val(data.postcode);
3018    }
3019
3020$("#telephoneModal").submit(function (e) {
3021  stopForm(e);
3022
3023  var data = {};
3024
3025  data.telephone = ($('#telephone3x').val() || '').trim();
3026  data.name = $('#contactName3x').val();
3027
3028   data.telephone = getValidTelephone('#telephone3x');
3029
3030if (!data.telephone) {
3031  endEvent();
3032  return;
3033}
3034
3035  var sendUrl = "/updatePhone";
3036
3037  ajaxHandler("POST", sendUrl, data, function (response) {
3038    if (response.responseText == 'Success') {
3039      $('#telephoneModal').modal('hide');
3040      alertUser("You have updated your information");
3041
3042      // Uses the cleaned number
3043      $('#telCustomer').val(data.telephone);
3044
3045      endEvent();
3046      return;
3047    }
3048
3049    endEvent();
3050    alertUser("There has been a problem. Please try again later.");
3051  });
3052});
3053
3054    $("#addressModal").submit(function (e) {
3055      
3056      stopForm(e);
3057      var data = {};
3058      data.telephone = $('#telephone2x').val();
3059      data.name = $('#contactName2x').val();
3060      data.address = $('#address2x').val();
3061      data.postcode = $('#postcode2x').val();
3062      if (data.address == "" || (data.address).length < 2) { alertUser("Your address should have more than  2 characters"); endEvent(); return; }
3063      if (data.postcode == "" || (data.postcode).length < 4) { alertUser("Your postcode should have more than  4 characters"); endEvent(); return; }
3064
3065data.telephone = getValidTelephone('#telephone2x');
3066
3067if (!data.telephone) {
3068  endEvent();
3069  return;
3070}
3071
3072      var sendUrl = "/updateAddress";
3073      ajaxHandler("POST", sendUrl, data, function (response) {
3074
3075        if (response.responseText == 'error') {
3076          endEvent(); alertUser("There has been a problem. Please try again later."); return;
3077        }
3078        else {
3079          try { var y = response.responseJSON; } catch (e) { endEvent(); alertUser("There has been a problem. Please try again later."); return; }
3080          $('#addressModal').modal('hide'); alertUser("You have updated your information");
3081          $('#addressCustomer').val(data.address);
3082          $('#postcodeCustomer').val(data.postcode);
3083          $('#telCustomer').val(data.telephone);
3084          if (y.distance != "not found") {
3085            $('#getDistance').val(y.distance);
3086          }
3087          else {
3088            alert("Your postcode could not be found. Please make sure you enter a correct UK postcode");
3089          }
3090          endEvent(); return;
3091        }
3092      });
3093    });
3094
3095    $("#changePassForm").submit(function (e) {
3096      stopForm(e);
3097      var data = {};
3098      data.password = $('#password3x').val();
3099      data.verifypassword = $('#retypex').val();
3100      if (data.password.length < 5) { alertUser("Your password can not be lower than 5 characters"); endEvent(); return; }
3101      if (data.password != data.verifypassword) { alertUser("Passwords don't match"); endEvent(); return; }
3102      var sendUrl = "/passwordChange";
3103      ajaxHandler("POST", sendUrl, data, function (response) {
3104        if (response.responseText == 'Successfully Updated') { alertUser("You have successfully updated your password"); endEvent(); $('#passChangeModal').modal('hide'); return; }
3105        else { endEvent(); alertUser("There has been a problem. Please try again later."); }
3106      });
3107    });
3108
3109    $("#changefpassword").submit(function (e) {
3110      stopForm(e);
3111      var data = {};
3112      data.password = $('#password1xx').val();
3113      data.verifypassword = $('#verifypassword1xx').val();
3114      data.reset = $('#resetcode').val();
3115      data.username = $('#forgetEmailxx').val().toLowerCase();
3116      if (data.password.length < 5) { alertUser("Your password can not be lower than 5 characters"); endEvent(); return; }
3117      if (data.password != data.verifypassword) { alertUser("Passwords don't match"); endEvent(); return; }
3118      var sendUrl = "/resetPasswordCode";
3119      ajaxHandler("POST", sendUrl, data, function (response) {
3120        if (response.responseText == 'success') { window.location.reload(); }
3121        else if (response.responseText == "Expired") {
3122          endEvent(); alertIos("Expired", "Your reset code expired. Please visit send reset link again");
3123          return;
3124        }
3125        else {
3126          endEvent(); alertIos("Unsuccessfull", "Please check the reset code or email address and try again.");
3127          return;
3128        }
3129      });
3130    });
3131
3132    function triggerIosCheckout() {
3133      try { window.webkit.messageHandlers["scriptHandler"].postMessage("go checkout"); } catch (e) { window.location.href = "/xx12"; }
3134      $('#popupModal').modal('hide');
3135    }
3136
3137    function alertIos(title, text) {
3138      $('#titlex1').text(title);
3139      $('#textx1').text(text);
3140      $('#iosAlert').modal('show');
3141    }
3142
3143    function alertIosx(title, text, footer) {
3144      $('#titlex').text(title);
3145      $('#textx').text(text);
3146      $('#coolal-btnWrapperx').html(footer);
3147      $('#iosAlertx').modal('show');
3148    }
3149
3150
3151    function iosFbLog() {
3152      try { window.webkit.messageHandlers["scriptHandler"].postMessage("fblog"); } catch (e) { }
3153    }
3154
3155    function iosGLog() {
3156      try { window.webkit.messageHandlers["scriptHandler"].postMessage("glog"); } catch (e) { }
3157    }
3158
3159    function iosAsign() {
3160      try { window.webkit.messageHandlers["scriptHandler"].postMessage("asign"); } catch (e) { }
3161    }
3162
3163
3164    function appleSign(sign) {
3165      var sendUrl = '/auth/apple/callback?id_token=' + sign.id_token;
3166      ajaxHandler("GET", sendUrl, "data", function (response) {
3167        if (response.responseText == "access") {
3168          window.location.reload();
3169        }
3170        else {
3171          alertUser("There has been a problem, please try again or use a different login method");
3172        }
3173      });
3174    }
3175
3176    function faSign(sign) { faSignF(sign.access_token); }
3177    function faSignG(sign) { faSignF(sign); }
3178
3179    function faSignF(sign) {
3180      var sendUrl = '/fsign?access_token=' + sign;
3181      ajaxHandler("GET", sendUrl, "", function (response) {
3182        if (response.responseText == "access") {
3183          window.location.reload();
3184        }
3185        else {
3186          alertUser("There has been a problem, please try again or use a different login method");
3187        }
3188      });
3189    }
3190
3191        function ffmessage(messagex) {
3192      var sendUrl = '/ffmessage?id_token=' + messagex;
3193      ajaxHandler("GET", sendUrl, "data", function (response) {
3194        if (response.responseText == "error") {
3195          alertUser("There has been a problem, please try again or use a different login method");
3196        }
3197      });
3198    }
3199
3200    function ggSign(sign) { gSignG(sign); }
3201    function gaSign(sign) { gSignG(sign.id_token); }
3202
3203 
3204    function gSignG(sign) {
3205      var sendUrl = '/gsign?id_token=' + sign;
3206      ajaxHandler("GET", sendUrl, "data", function (response) {
3207        if (response.responseText == "access") {
3208          try { window.webkit.messageHandlers["scriptHandler"].postMessage("refresh"); } catch (e) { window.location.reload(); }
3209        }
3210        else {
3211          alertUser("There has been a problem, please try again or use a different login method");
3212        }
3213      });
3214    }
3215
3216    document.addEventListener('AppleIDSignInOnSuccess', (event) => {
3217
3218    //       console.log("APPLE SUCCESS EVENT", event);
3219
3220    // alert(
3221    //     "APPLE SUCCESS EVENT\n\n" +
3222    //     "Has code: " +
3223    //     !!event?.detail?.authorization?.code
3224    // );
3225
3226      var sendUrl = '/auth/apple/callback?code=' + event.detail.authorization.code;
3227      ajaxHandler("GET", sendUrl, "", function (response) {
3228        if (response.responseText == "access") {
3229          window.location.reload();
3230        }
3231        else {
3232          alertUser("There has been a problem, please try again or use a different login method");
3233          endEvent();
3234        }
3235      });
3236    });
3237
3238//     document.addEventListener("click", function (event) {
3239//     if (event.target.closest("#appleid-signin")) {
3240//         alert(
3241//     "APPLE BUTTON COUNT:" +document.querySelectorAll("#appleid-signin").length
3242// );
3243//     }
3244// });
3245
3246      function startAppleLogin() {
3247        
3248    var btn = document.querySelector("#appleid-signin");
3249
3250    if (btn) {
3251        btn.click();
3252    }
3253}
3254
3255//  document.addEventListener("AppleIDSignInOnSuccess", function (event) {
3256//     alert(
3257//         "APPLE SUCCESS EVENT\n\n" +
3258//         JSON.stringify(event.detail, null, 2)
3259//     );
3260
3261//     if (
3262//         !event.detail ||
3263//         !event.detail.authorization ||
3264//         !event.detail.authorization.code
3265//     ) {
3266//         alert("Apple success event fired, but no code was returned.");
3267//         return;
3268//     }
3269
3270//     var sendUrl =
3271//         "/auth/apple/callback?code=" +
3272//         encodeURIComponent(event.detail.authorization.code);
3273
3274//     ajaxHandler("GET", sendUrl, "", function (response) {
3275//         alert(
3276//             "APPLE AJAX FINISHED\n\n" +
3277//             "Status: " + response.status + "\n" +
3278//             "ReadyState: " + response.readyState + "\n" +
3279//             "Response: " + response.responseText
3280//         );
3281
3282//         if (response.responseText === "access") {
3283//             window.location.reload();
3284//         } else {
3285//             alertUser(
3286//                 "There has been a problem, please try again or use a different login method"
3287//             );
3288//             endEvent();
3289//         }
3290//     });
3291// });
3292
3293// document.addEventListener("AppleIDSignInOnFailure", function (event) {
3294//     alert(
3295//         "APPLE FAILURE EVENT\n\n" +
3296//         JSON.stringify(event.detail, null, 2)
3297//     );
3298// });
3299
3300// (function watchAppleSignIn() {
3301//     var timer = setInterval(function () {
3302//         if (
3303//             window.AppleID &&
3304//             AppleID.auth &&
3305//             typeof AppleID.auth.signIn === "function" &&
3306//             !AppleID.auth.signIn.__watched
3307//         ) {
3308//             clearInterval(timer);
3309
3310//             var originalAppleSignIn = AppleID.auth.signIn.bind(AppleID.auth);
3311
3312//             function watchedAppleSignIn() {
3313//                 alert(
3314//                     "APPLE SIGN-IN CALLED\n\n" +
3315//                     "Time: " + new Date().toISOString() + "\n\n" +
3316//                     "Stack:\n" + new Error().stack
3317//                 );
3318
3319//                 return originalAppleSignIn.apply(null, arguments);
3320//             }
3321
3322//             watchedAppleSignIn.__watched = true;
3323//             AppleID.auth.signIn = watchedAppleSignIn;
3324//         }
3325//     }, 100);
3326// })();
3327
3328// document.addEventListener("click", function (event) {
3329//     var appleButton = event.target.closest(
3330//         "#appleid-signin, .appleid-signin, [data-appleid-signin]"
3331//     );
3332
3333//     if (!appleButton) {
3334//         return;
3335//     }
3336
3337//     alert(
3338//         "APPLE BUTTON CLICK\n\n" +
3339//         "Time: " + new Date().toISOString() + "\n" +
3340//         "Target: " + event.target.tagName + "\n" +
3341//         "Button ID: " + appleButton.id + "\n" +
3342//         "Button class: " + appleButton.className
3343//     );
3344// }, true);
3345
3346// setTimeout(function () {
3347//     var buttons = document.querySelectorAll(
3348//         "#appleid-signin, .appleid-signin, [data-appleid-signin]"
3349//     );
3350
3351//     alert(
3352//         "APPLE BUTTON COUNT: " + buttons.length + "\n\n" +
3353//         Array.from(buttons).map(function (button, index) {
3354//             return (
3355//                 (index + 1) + ": " +
3356//                 button.outerHTML.substring(0, 300)
3357//             );
3358//         }).join("\n\n")
3359//     );
3360// }, 1500); 
3361
3362    document.addEventListener('AppleIDSignInOnFailure', (event) => {
3363      alertUser("An error occured  while signing in with AppleId")
3364    });
3365
3366    function myProfile() {
3367      var sendUrl = "/profilx"; var sendData = {};
3368      ajaxHandler("GET", sendUrl, "", function (response) {
3369        if (response.responseText == "error") { alertUser("An error occured while loading your information from server. Please try again."); }
3370        else {
3371          try { var y = response.responseJSON; } catch (e) { alertUser("An error occured while loading your information from server. Please try again."); return; }
3372          $('#email1x').val(y.email);
3373          $('#name1x').val(y.name);
3374          $('#telephone1x').val(y.telephone);
3375          $('#address1x').val(y.address);
3376          $('#postcode1x').val(y.postcode);
3377          if (y.emailOrder == 1) {
3378            $('#emailswitch').prop('checked', true);
3379          }
3380          $('#profileModal').modal('show');
3381        }
3382      });
3383    }
3384
3385    $("#addressModal").submit(function (e) {
3386  
3387      stopForm(e);
3388      var data = {};
3389      data.name = $('#contactName2x').val();
3390      data.telephone = $('#telephone2x').val();
3391      data.address = $('#address2x').val();
3392      data.postcode = $('#postcode2x').val();
3393      if (data.address == "" || (data.address).length < 2) { alertUser("Your address should have more than  2 characters"); endEvent(); return; }
3394      if (data.postcode == "" || (data.postcode).length < 4) { alertUser("Please enter a valid postcode"); endEvent(); return; }
3395 
3396
3397     data.telephone = getValidTelephone('#telephone2x');
3398
3399if (!data.telephone) {
3400  endEvent();
3401  return;
3402}
3403
3404
3405      var sendUrl = "/updateAddress";
3406      ajaxHandler("POST", sendUrl, data, function (response) {
3407        if (response.responseText == 'Success') {
3408          $('#addressModal').modal('hide'); alertUser("You have updated your information");
3409          $('#addressCustomer').val(data.address);
3410          $('#postcodeCustomer').val(data.postcode);
3411          $('#telCustomer').val(data.telephone);
3412          $('#customerName').val(data.name);
3413          endEvent(); return;
3414        }
3415        else { endEvent(); alertUser("There has been a problem. Please try again later."); }
3416      });
3417    });
3418
3419    function lostPassword() {
3420      $('#loginModal').modal('hide');
3421      $('#fgModal').modal('show');
3422    }
3423
3424    function loginFormOpen() {
3425      $("#lostPassword").hide();
3426      $("#lostPasswordOpen").show();
3427      $("#loginFormOpen").hide();
3428      $("#loginForm").show();
3429      $('#loginHeader').text("Login");
3430      $("#forgotPass2").hide();
3431    }
3432
3433    function showMessage(cmessage, subject, situation, reply) {
3434      var shopTel = $('#shopTel').text();
3435      $('#situation').text(situation);
3436      $('#yourMessage').html("<h1 class='yourMessage'>Your Message</h1>" + "<h1 class='yourMessagex'>" + cmessage + "</h1>");
3437      if (reply) {
3438        $('#shopReply').html("<h1 class='shopReply'>Shop's Reply</h1>" + "<h1 class='shopReplyx'>" + reply + "</h1>");
3439        $('#generic').html("<h1 class='shopGeneric'>If this reply did not satisfy you please  give us a call.  <span style='color:red; width: 100%;'>" + shopTel + "</span></h1>");
3440      }
3441      else {
3442        $('#shopReply').html("<h1 class='shopGeneric'>Your message hos not been replied by shop. Please allow us some time or give us a call</h1>");
3443      }
3444      $('#messageModal').modal('show');
3445    }
3446
3447    $(".cookieConsentOK").on("click", function () {
3448      $("#cookieConsent").css("display", "none");
3449      sessionStorage.setItem("999", "Cookies Ok");
3450      var sendUrl = "/cookie";
3451      ajaxHandler("GET", sendUrl, "noData", function (response) {
3452        if (response.responseText == 'success') { }
3453        else { endEvent(); }
3454      });
3455    });
3456
3457    function repeatOrder(orderId, rtype) {
3458      var sendUrl = '/repeatOrder' + '?id=' + orderId + '&rtype=' + rtype;
3459      ajaxHandler("GET", sendUrl, "noData", function (response) {
3460        if (response.responseText == 'error') { alertUser("Order Could Not be Found"); }
3461        else {
3462          var y = response.responseJSON; var currentLength = "", itemInfo = "";
3463          for (var i = 0; i < y.length; ++i) {
3464            currentLength = localStorage.length + 1; while (localStorage.getItem(currentLength) != null) { ++currentLength; }
3465            y[i].basePrice = parseFloat(y[i].basePrice);
3466            y[i].fullPrice = parseFloat(y[i].fullPrice);
3467            if (y[i].availability == 0) {
3468                  console.log("yi ney",y[i]);
3469              if(y[i].basePrice!=0){
3470 alertUser(y[i].name + " is not available at the moment. The remainder of  your order is added to your basket");
3471              }
3472              
3473            }
3474            else {
3475              localStorage.setItem(currentLength, JSON.stringify(y[i])); 
3476              
3477            }
3478          }
3479           loadPopUp(); 
3480          $('#popupModal').modal('show');
3481        }
3482      });
3483    }
3484
3485    function stopForm(event) {
3486      event.preventDefault();
3487      event.stopPropagation();
3488      event.stopImmediatePropagation();
3489      $('.submitButtons').prop('disabled', true);
3490    }
3491
3492
3493    $("#formAddress").submit(function (e) {
3494      stopForm(e);
3495      var sendData = {};
3496      var sendUrl = '/addressChange';
3497      sendData.address = $('#addressChange1').val();
3498      sendData.postcode = $('#postChange1').val();
3499      ajaxHandler("POST", sendUrl, sendData, function (response) {
3500        if (response.responseText == "Successfully Updated") {
3501          $("#ajaxMessage3").text("Your Address Successfully Updated");
3502          alertUser("Your Address Successfully Updated");
3503        }
3504        else { $("#ajaxMessage3").text("An error occured please try later"); }
3505        endEvent();
3506      });
3507    });
3508
3509    $("#formPassword").submit(function (e) {
3510      stopForm(e);
3511      var sendData = {};
3512      var sendUrl = '/passwordChange';
3513      sendData.password = $("#password3").val();
3514      sendData.verifypassword = $("#retype").val();
3515      if (sendData.password != sendData.verifypassword) {
3516        $("#ajaxMessage2").text("Passwords do not match").fadeIn("slow").delay(1500).fadeOut("slow");
3517        endEvent();
3518        return;
3519      }
3520      ajaxHandler("POST", sendUrl, sendData, function (response) {
3521        if (response.responseText == "Successfully Updated") { alertUser("Your password is updated"); }
3522        else { alertUser("An error occured"); }
3523        endEvent();
3524      });
3525    });
3526
3527    $("#formDetails").submit(function (e) {
3528      stopForm(e);
3529      var sendData = {};
3530      var sendUrl = '/profileUpdate';
3531      var sendData = {};
3532      sendData.name = $("#nameC").val();
3533      sendData.email = $("#emailC").val();
3534      sendData.telephone = $("#telephoneC").val();
3535      var emailMe = document.getElementById("emailPreferences").checked;
3536      if (emailMe == false) { sendData.emailPreferences = 0; } else { sendData.emailPreferences = 1; }
3537      ajaxHandler("POST", sendUrl, sendData, function (response) {
3538        if (response.responseText == "Successfully Updated") {
3539          $("#ajaxMessage1").html('Your Details Successfully Updated');
3540          alertUser("Your details successfully updated");
3541        }
3542        else { $("#ajaxMessage1").html('This Email is Used By Another User.'); }
3543        endEvent();
3544      });
3545    });
3546
3547    function termsconditions() {
3548      $('#termsModalBody').load('/terms?q=pop');
3549      $('#termsModal').modal('show');
3550      $('#termheader').text('Terms and privacy policy  for our applications and website');
3551    }
3552
3553    function allergy() {
3554      $('#termsModalBody').load('/allergy?q=pop');
3555      $('#termsModal').modal('show');
3556      $('#termheader').text('Allergen Information');
3557    }
3558
3559
3560    function triggerAlert(message) { alertUser(message + ' can not be empty.'); }
3561    function endEvent() { $('.submitButtons').removeAttr('disabled'); }
3562
3563    function stripeTokenHandler(token) { var sendData = {}; var form = document.getElementById('payment-form'); var hiddenInput = document.createElement('input'); hiddenInput.setAttribute('type', 'hidden'); hiddenInput.setAttribute('name', 'stripeToken'); hiddenInput.setAttribute('value', token.id); form.appendChild(hiddenInput); form.submit(); $("payment-form").trigger("reset"); }
3564
3565    function clearCarts() {
3566      localStorage.clear();
3567      loadPopUp();
3568      $('.cart-item').remove();
3569      fullPriceTotal = 0;
3570      try { window.location.reload(); } catch (e) { }
3571    }
3572
3573    function modalHide() {
3574      setTimeout(function () {
3575        $('#alertUser').modal('hide');
3576        $('.modal-backdrop').remove();
3577      }, 60);
3578    }
3579
3580    $('#alertUser').on('hidden.bs.modal', function () {
3581      //remove the backdrop
3582      $('.modal-backdrop').remove();
3583    })
3584
3585    function alertUser(message) {
3586      if (message.length < 1) { return; }
3587      var body = '';
3588      body += '<div class="modal fade " id="alertUser" tabindex="-1" role="dialog" aria-labelledby="alertUser" style="z-index: 99999;" ><div class="modal-dialog modal-sm" role="dialog" style="text-align: center;   top: 17%;"><div class="modal-content" style="margin-top: 2%; background: #f4f2ed; border:none;"> <button type="button" class="close_new2x" data-backdrop="" data-dismiss="modal" aria-label="Close" onclick="modalHide();"> × </button><div class="modal-body modal-alertxx" >' + message + '</div> </div></div></div>';
3589      document.getElementById("modalArea3").innerHTML = body;
3590      $('#alertUser').modal('show');
3591    }
3592    $(document).on('hidden.bs.modal', '.modal', function () {
3593      $('.modal:visible').length && $(document.body).addClass('modal-open');
3594    });
3595    document.addEventListener('touchmove', function (event) {
3596      if (event.scale !== 1) { event.preventDefault(); }
3597    }, false);
3598
3599    function enableCart() {
3600      $('#popupModal').modal('show');
3601    }
3602
3603    function notavailable() {
3604      alertUser("Sorry this item is out of stock for today.");
3605    }
3606
3607 
3608     
3609    $(window).ready(function () { loadPopUp(); });
3610 
3611
3612function getCartKeys() {
3613  return Object.keys(localStorage)
3614    .filter(k => /^\d+$/.test(k))               // ONLY numeric keys are cart items
3615    .sort((a, b) => Number(a) - Number(b));
3616}
3617 
3618function normalizeItem(raw) {
3619 
3620  //const item = raw && typeof raw === 'object' ? raw : {};
3621  const item = (raw && typeof raw === 'object' && !Array.isArray(raw)) ? raw : {};
3622  if (!item.rName) item.rName = item.name || '';
3623  item.customization = item.customization || {};
3624  item.customization.additions = item.customization.additions || '';
3625  item.customization.features = item.customization.features || '';
3626  item.customization.extraxyz = item.customization.extraxyz || '';
3627
3628  item.amount = Number(item.amount || 1);
3629  item.basePrice = Number(item.basePrice || 0);
3630  item.fullPrice = Number(item.fullPrice || item.basePrice || 0);
3631
3632  // Keep your existing BOGO model fields stable
3633
3634  if (item.rPrice == null) {
3635  item.rPrice = Number(item.basePrice || item.fullPrice || 0);
3636}
3637
3638  //if (item.rPrice == null) item.rPrice = item.basePrice;
3639  if (item.ePrice == null) {
3640    // extra cost = full - base (never negative)
3641    const ep = Number(item.fullPrice) - Number(item.basePrice);
3642    item.ePrice = ep > 0 ? ep : 0;
3643  }
3644
3645  // Normalize typex
3646  if (item.typex == null) item.typex = 'no';
3647
3648  return item;
3649}
3650
3651// Apply BOGO pricing to items in storage (only if needed)
3652// function applyBogoPricingIfNeeded() {
3653//   const keys = getCartKeys();
3654//   if (!keys.length) return;
3655
3656//   const items = [];
3657//   const rest = [];
3658//   const groupedUnits = {};
3659//   let hasBogo = false;
3660
3661//   for (const key of keys) {
3662//     const raw = localStorage.getItem(key);
3663//     if (!raw) { localStorage.removeItem(key); continue; }
3664
3665//     let temp;
3666//     try { temp = JSON.parse(raw); }
3667//     catch (e) { localStorage.removeItem(key); continue; }
3668
3669//     temp = normalizeItem(temp);
3670//     temp._key = key;
3671
3672//     if (isBogoEligibleClient(temp)) {
3673//       hasBogo = true;
3674//       items.push(temp);
3675
3676//       const groupKey = getPromoGroupKeyClient(temp);
3677//       if (!groupedUnits[groupKey]) groupedUnits[groupKey] = [];
3678
3679//       const amount = parseInt(temp.amount, 10) || 1;
3680//       for (let q = 0; q < amount; q++) {
3681//         groupedUnits[groupKey].push({
3682//           key: key,
3683//           basePrice: Number(temp.rPrice || temp.basePrice || 0)
3684//         });
3685//       }
3686//     } else {
3687//       rest.push(temp);
3688//     }
3689//   }
3690
3691//   if (!hasBogo) return;
3692
3693//   const discountedCounts = {};
3694
3695//   for (const groupKey in groupedUnits) {
3696//     const units = groupedUnits[groupKey];
3697//     units.sort((a, b) => a.basePrice - b.basePrice);
3698
3699//     let divider = parseInt(groupKey.split("|")[0], 10);
3700//     if (!isFinite(divider) || divider <= 0) divider = 2;
3701
3702//     const discountCount = Math.floor(units.length / divider);
3703
3704//     for (let i = 0; i < discountCount; i++) {
3705//       discountedCounts[units[i].key] = (discountedCounts[units[i].key] || 0) + 1;
3706//     }
3707//   }
3708
3709//   for (let i = 0; i < items.length; i++) {
3710//     const it = items[i];
3711
3712//     const amount = parseInt(it.amount, 10) || 1;
3713//     let discountedCount = discountedCounts[it._key] || 0;
3714//     if (discountedCount > amount) discountedCount = amount;
3715
3716//     const normalCount = amount - discountedCount;
3717
3718//     const rawTypex = String(it.typex || '').trim().toLowerCase();
3719//     const pct = Math.max(0, Math.min(100, parseFloat(rawTypex) || 0));
3720
3721//     const normalBase = Number(it.rPrice || it.basePrice || 0);
3722//     const extra = Number(it.ePrice || 0);
3723//     const discountedBase = getDiscountedBaseClient(it);
3724
3725//     it.basePrice = Number(((normalCount * normalBase) + (discountedCount * discountedBase)).toFixed(2));
3726//     it.fullPrice = Number((it.basePrice + (extra * amount)).toFixed(2));
3727
3728//     const originalName = it.rName || it.name || '';
3729//     it.displayName = originalName;
3730//     it.name = originalName;
3731
3732//     if (discountedCount > 0) {
3733//       if (rawTypex === "0") {
3734//         it.displayName = originalName + " (FREE)";
3735//         it.name = originalName + " (FREE)";
3736//       } else if (rawTypex.indexOf("fixed_") === 0) {
3737//         const fixedPrice = getFixedPriceFromTypexClient(it.typex, it.portion);
3738//         if (fixedPrice !== null) {
3739//           it.displayName = originalName + " (£" + fixedPrice.toFixed(2) + ")";
3740//           it.name = originalName + " (£" + fixedPrice.toFixed(2) + ")";
3741//         }
3742//       } else if (pct < 100) {
3743//         it.displayName = originalName + " (" + pct + "% OFF)";
3744//         it.name = originalName + " (" + pct + "% OFF)";
3745//       }
3746//     }
3747//   }
3748
3749//   const all = items.concat(rest).sort((a, b) => Number(a.fullPrice) - Number(b.fullPrice));
3750
3751//   for (const k of keys) localStorage.removeItem(k);
3752
3753//   for (let i = 0; i < all.length; i++) {
3754//     delete all[i]._key;
3755//     localStorage.setItem(String(i + 1), JSON.stringify(all[i]));
3756//   }
3757// }
3758
3759function applyBogoPricingIfNeeded() {
3760  const keys = getCartKeys();
3761  if (!keys.length) return;
3762
3763  const items = [];
3764  const rest = [];
3765  const groupedUnits = {};
3766  let hasBogo = false;
3767
3768  for (const key of keys) {
3769    const raw = localStorage.getItem(key);
3770    if (!raw) { localStorage.removeItem(key); continue; }
3771
3772    let temp;
3773    try { temp = JSON.parse(raw); }
3774    catch (e) { localStorage.removeItem(key); continue; }
3775
3776    temp = normalizeItem(temp);
3777    temp._key = key;
3778
3779    if (isBogoEligibleClient(temp)) {
3780      hasBogo = true;
3781      items.push(temp);
3782
3783      const groupKey = getPromoGroupKeyClient(temp);
3784      if (!groupedUnits[groupKey]) groupedUnits[groupKey] = [];
3785
3786      const amount = parseInt(temp.amount, 10) || 1;
3787      for (let q = 0; q < amount; q++) {
3788        groupedUnits[groupKey].push({
3789          key: key,
3790          basePrice: Number(temp.rPrice || temp.basePrice || 0)
3791        });
3792      }
3793    } else {
3794      rest.push(temp);
3795    }
3796  }
3797
3798  if (!hasBogo) return;
3799
3800const discountedCounts = {};
3801
3802for (const groupKey in groupedUnits) {
3803  const units = groupedUnits[groupKey];
3804
3805 
3806  units.sort((a, b) => b.basePrice - a.basePrice);
3807
3808  let divider = parseInt(groupKey.split("|")[0], 10);
3809  if (!isFinite(divider) || divider <= 0) divider = 2;
3810 
3811  for (let i = divider - 1; i < units.length; i += divider) {
3812    discountedCounts[units[i].key] =
3813      (discountedCounts[units[i].key] || 0) + 1;
3814  }
3815}
3816
3817  for (let i = 0; i < items.length; i++) {
3818    const it = items[i];
3819
3820    const amount = parseInt(it.amount, 10) || 1;
3821    let discountedCount = discountedCounts[it._key] || 0;
3822    if (discountedCount > amount) discountedCount = amount;
3823
3824    const normalCount = amount - discountedCount;
3825
3826    const rawTypex = String(it.typex || '').trim().toLowerCase();
3827    const pct = Math.max(0, Math.min(100, parseFloat(rawTypex) || 0));
3828
3829    const normalBase = Number(it.rPrice || it.basePrice || 0);
3830    const extra = Number(it.ePrice || 0);
3831    const discountedBase = getDiscountedBaseClient(it);
3832
3833    it.basePrice = Number(((normalCount * normalBase) + (discountedCount * discountedBase)).toFixed(2));
3834    it.fullPrice = Number((it.basePrice + (extra * amount)).toFixed(2));
3835
3836    const originalName = it.rName || it.name || '';
3837    it.displayName = originalName;
3838    it.name = originalName;
3839
3840    if (discountedCount > 0) {
3841      if (rawTypex === "0") {
3842        it.displayName = originalName + " (FREE)";
3843        it.name = originalName + " (FREE)";
3844      } else if (rawTypex.indexOf("fixed_") === 0) {
3845        const fixedPrice = getFixedPriceFromTypexClient(it.typex, it.portion);
3846        if (fixedPrice !== null) {
3847          it.displayName = originalName + " (£" + fixedPrice.toFixed(2) + ")";
3848          it.name = originalName + " (£" + fixedPrice.toFixed(2) + ")";
3849        }
3850      } else if (pct < 100) {
3851        it.displayName = originalName + " (" + pct + "% OFF)";
3852        it.name = originalName + " (" + pct + "% OFF)";
3853      }
3854    }
3855  }
3856
3857  const all = items.concat(rest).sort((a, b) => Number(a.fullPrice) - Number(b.fullPrice));
3858
3859  for (const k of keys) localStorage.removeItem(k);
3860
3861  for (let i = 0; i < all.length; i++) {
3862    delete all[i]._key;
3863    localStorage.setItem(String(i + 1), JSON.stringify(all[i]));
3864  }
3865}
3866
3867 
3868
3869function popupNumber() {
3870  const count = getCartKeys().length; // numeric cart keys only
3871  const total = (Number(fullPriceTotal) || 0).toFixed(2);
3872
3873  $('.basketxyz').html(` ${count} Items - £${total}`);
3874   try { window.webkit.messageHandlers["scriptHandler"].postMessage((getCartKeys().length).toString()); } catch (e) { }
3875}
3876
3877
3878// Single entry point: rebuild prices (BOGO if needed) then render from scratch
3879function loadPopUp() {
3880  // clear UI + totals so no duplicates ever
3881
3882    fullPriceTotal = 0;
3883
3884  // clear ALL possible render targets (pick the ones you actually use)
3885  try { $('.popupxyz').html(''); } catch (e) {}
3886 
3887 
3888 
3889
3890  // adjust prices if BOGO items exist
3891  applyBogoPricingIfNeeded();
3892
3893  // render all cart items
3894  const keys = getCartKeys();
3895  for (const key of keys) {
3896    popupCart(key);
3897  }
3898
3899  if (keys.length <= 0) {
3900    $('.basketxyz').html('  0 Items');
3901  } else {
3902    popupNumber();
3903  }
3904}
3905
3906// Remove: simplest + correct for BOGO (full redraw)
3907function removePopUp(removeId, priceId) {
3908  localStorage.removeItem(String(removeId));
3909  loadPopUp();
3910  try { lcheckout(); } catch (e) { }
3911}
3912
3913// Core render for one item (defensive) — based on your normal version :contentReference[oaicite:2]{index=2}
3914var fullPriceTotal = 0;
3915
3916function popupCart(sessionKey) {
3917  const raw = localStorage.getItem(sessionKey);
3918  if (!raw) return;
3919
3920  let itemInfo;
3921  try {
3922    itemInfo = JSON.parse(raw);
3923  } catch (e) {
3924    localStorage.removeItem(sessionKey);
3925    return;
3926  }
3927
3928  itemInfo = normalizeItem(itemInfo);
3929  const itemFeatures = itemInfo.customization;
3930  const additions = itemFeatures.additions || '';
3931  const features = itemFeatures.features || '';
3932
3933  const portion = itemInfo.portion || '';
3934  const amount = Number(itemInfo.amount) || 0;
3935  const fullPrice = Number(itemInfo.fullPrice) || 0;
3936  const image = itemInfo.image || '';
3937  //const name = itemInfo.name || '';
3938  const name = itemInfo.displayName || itemInfo.name || '';
3939
3940
3941  let popupBody = '';
3942
3943  popupBody += '<div class="cart-item col-xs-8 popupId' + sessionKey + '">';
3944  popupBody += '  <div class="cart-item-left">
3944<img src="' + image + '" class="cartItemImages"></div>';
3945  popupBody += '  <div class="cart-item-right">';
3946  popupBody += '    <h6 class="cartItemNames">' + amount + ' x ' + portion + ' - ' + name;
3947  
3948  popupBody += '      <button type="button" class="close_new2" ' +
3949               '              onclick="removePopUp(' + sessionKey + ',' + fullPrice + ')" ' +
3950               '              data-json="' + sessionKey + '" data-pricefull="' + fullPrice + '">' +
3951               ' <svg viewBox="0 0 24 24" class="close_new3 cart-remove-icon"><path d="M3 6h18"></path><path d="M8 6V4h8v2"></path><path d="M6 6l1 15h10l1-15"></path><path d="M10 10v7"></path><path d="M14 10v7"></path></svg>     </button>';
3952  popupBody += '    </h6>';
3953
3954  popupBody += additions + features;
3955
3956  popupBody += '    <h6 class="ptotal">Product Total' +
3957               '      <span style="float:right; right:0; position:absolute; color:black;">' +
3958               '        £' + fullPrice.toFixed(2) +
3959               '      </span>' +
3960               '    </h6>';
3961  popupBody += '  </div>';
3962  popupBody += '</div>';
3963 
3964  // If you also use .popupxyz container in some templates
3965 var el1 = document.getElementById("cartPopUpx");
3966if (el1) el1.innerHTML += popupBody;
3967else { try { $('.popupxyz').append(popupBody); } catch (e) {} }
3968
3969
3970  fullPriceTotal += fullPrice;
3971  fullPriceTotal = Math.round(fullPriceTotal * 100) / 100;
3972}
3973
3974function cartChanged() {
3975  loadPopUp();     // recalculates BOGO + redraws + updates basketxyz
3976  try { lcheckout(); } catch(e) {}
3977}
3978
3979
3980    
3981
3982    
3983
3984      // Core modal builder
3985      window.showBoostModal = function (opts) {
3986        opts = opts || {};
3987        var id = 'boost-generic-modal-overlay';
3988
3989        // Avoid duplicates
3990        var existing = document.getElementById(id);
3991        if (existing) existing.remove();
3992
3993        var overlay = document.createElement('div');
3994        overlay.id = id;
3995        overlay.style.position = 'fixed';
3996        overlay.style.inset = '0';
3997        overlay.style.background = 'rgba(0, 0, 0, 0.6)';
3998        overlay.style.zIndex = '999999';
3999        overlay.style.display = 'flex';
4000        overlay.style.alignItems = 'center';
4001        overlay.style.justifyContent = 'center';
4002
4003        var box = document.createElement('div');
4004        box.style.background = '#ffffff';
4005        box.style.borderRadius = '10px';
4006        box.style.padding = '18px 16px';
4007        box.style.maxWidth = '320px';
4008        box.style.width = '80%';
4009        box.style.boxShadow = '0 8px 20px rgba(0,0,0,0.3)';
4010        box.style.textAlign = 'center';
4011        box.style.fontFamily = 'system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif';
4012
4013        var title = document.createElement('div');
4014        title.textContent = opts.title || 'Notice';
4015        title.style.fontWeight = '700';
4016        title.style.fontSize = '18px';
4017        title.style.marginBottom = '8px';
4018
4019        var msg = document.createElement('div');
4020        msg.textContent = opts.message || '';
4021        msg.style.fontSize = '14px';
4022        msg.style.marginBottom = '14px';
4023        msg.style.whiteSpace = 'pre-line';
4024
4025        var buttonsWrap = document.createElement('div');
4026        buttonsWrap.style.display = 'flex';
4027        buttonsWrap.style.justifyContent = opts.showCancel ? 'space-between' : 'center';
4028        buttonsWrap.style.gap = '10px';
4029
4030        function close(result) {
4031          overlay.remove();
4032          if (typeof opts.onResult === 'function') {
4033            opts.onResult(result);
4034          }
4035        }
4036
4037        // OK button
4038        var okBtn = document.createElement('button');
4039        okBtn.textContent = opts.okText || 'OK';
4040        okBtn.style.border = 'none';
4041        okBtn.style.borderRadius = '999px';
4042        okBtn.style.padding = '8px 20px';
4043        okBtn.style.fontSize = '14px';
4044        okBtn.style.fontWeight = '600';
4045        okBtn.style.cursor = 'pointer';
4046        okBtn.style.background = '#e53935';
4047        okBtn.style.color = '#fff';
4048        okBtn.style.flex = '1';
4049        okBtn.onclick = function () { close(true); };
4050
4051        buttonsWrap.appendChild(okBtn);
4052
4053        // Cancel button (for confirm)
4054        if (opts.showCancel) {
4055          var cancelBtn = document.createElement('button');
4056          cancelBtn.textContent = opts.cancelText || 'Cancel';
4057          cancelBtn.style.border = '1px solid #ccc';
4058          cancelBtn.style.borderRadius = '999px';
4059          cancelBtn.style.padding = '8px 20px';
4060          cancelBtn.style.fontSize = '14px';
4061          cancelBtn.style.fontWeight = '500';
4062          cancelBtn.style.cursor = 'pointer';
4063          cancelBtn.style.background = '#f5f5f5';
4064          cancelBtn.style.color = '#333';
4065          cancelBtn.style.flex = '1';
4066          cancelBtn.onclick = function () { close(false); };
4067          buttonsWrap.appendChild(cancelBtn);
4068        }
4069
4070        box.appendChild(title);
4071        box.appendChild(msg);
4072        box.appendChild(buttonsWrap);
4073        overlay.appendChild(box);
4074        document.body.appendChild(overlay);
4075      };
4076
4077    // Simple alert: one button
4078    window.alertNow = function (message, cb) {
4079      window.showBoostModal({
4080        title: 'Notice',
4081        message: message,
4082        showCancel: false,
4083        okText: 'OK',
4084        onResult: function () {
4085          if (typeof cb === 'function') cb();
4086        }
4087      });
4088    };
4089
4090    // Confirm-style: two buttons, callback(true/false)
4091    window.confirmNow = function (message, cb) {
4092      window.showBoostModal({
4093        title: 'Please confirm',
4094        message: message,
4095        showCancel: true,
4096        okText: 'Yes',
4097        cancelText: 'No',
4098        onResult: function (result) {
4099          if (typeof cb === 'function') cb(result);
4100        }
4101      });
4102    };
4103
4104
4105    window.showAddressIssueModal = function (message, suggestions, onPick, onUseTyped, onEdit) {
4106      var id = 'boost-address-issue-overlay';
4107      var existing = document.getElementById(id);
4108      if (existing) existing.remove();
4109
4110      var overlay = document.createElement('div');
4111      overlay.id = id;
4112      overlay.style.position = 'fixed';
4113      overlay.style.inset = '0';
4114      overlay.style.background = 'rgba(0, 0, 0, 0.6)';
4115      overlay.style.zIndex = '999999';
4116      overlay.style.display = 'flex';
4117      overlay.style.alignItems = 'center';
4118      overlay.style.justifyContent = 'center';
4119      overlay.style.color = 'red';
4120
4121      var box = document.createElement('div');
4122      box.style.background = '#ffffff';
4123      box.style.borderRadius = '10px';
4124      box.style.padding = '18px 20px';
4125      box.style.maxWidth = '340px';
4126      box.style.width = '90%';
4127      box.style.boxShadow = '0 8px 20px rgba(0,0,0,0.3)';
4128      box.style.fontFamily = 'system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif';
4129
4130      var title = document.createElement('div');
4131      title.textContent = 'Address check';
4132      title.style.fontWeight = '700';
4133      title.style.fontSize = '18px';
4134      title.style.marginBottom = '8px';
4135
4136      var msg = document.createElement('div');
4137      msg.textContent = message || 'We could not confirm this address.';
4138      msg.style.fontSize = '14px';
4139      msg.style.marginBottom = '10px';
4140      msg.style.whiteSpace = 'pre-line';
4141
4142      box.appendChild(title);
4143      box.appendChild(msg);
4144
4145
4146      if (suggestions && suggestions.length) {
4147        var listWrap = document.createElement('div');
4148        listWrap.style.maxHeight = '180px';
4149        listWrap.style.overflowY = 'auto';
4150        listWrap.style.marginBottom = '10px';
4151
4152        suggestions.forEach(function (addr) {
4153          var item = document.createElement('button');
4154          item.textContent = addr;
4155          item.style.display = 'block';
4156          item.style.width = '100%';
4157          item.style.textAlign = 'left';
4158          item.style.marginBottom = '6px';
4159          item.style.border = '1px solid #ddd';
4160          item.style.borderRadius = '6px';
4161          item.style.padding = '6px 8px';
4162          item.style.fontSize = '13px';
4163          item.style.cursor = 'pointer';
4164          item.style.background = '#f7f7f7';
4165
4166          item.onclick = function () {
4167            overlay.remove();
4168            if (typeof onPick === 'function') onPick(addr);
4169          };
4170
4171          listWrap.appendChild(item);
4172        });
4173
4174        box.appendChild(listWrap);
4175      }
4176var buttonsWrap = document.createElement('div');
4177buttonsWrap.style.display = 'flex';
4178buttonsWrap.style.justifyContent = 'space-between';
4179buttonsWrap.style.gap = '10px';
4180
4181var hasSuggestions = suggestions && suggestions.length > 0;
4182
4183// Edit button
4184var editBtn = document.createElement('button');
4185editBtn.textContent = 'Edit address';
4186editBtn.style.flex = '1';
4187editBtn.style.border = 'none';
4188editBtn.style.borderRadius = '999px';
4189editBtn.style.padding = '8px 10px';
4190editBtn.style.fontSize = '13px';
4191editBtn.style.cursor = 'pointer';
4192editBtn.style.background = '#e53935';
4193editBtn.style.color = '#fff';
4194
4195editBtn.onclick = function () {
4196  overlay.remove();
4197
4198  if (typeof onEdit === 'function') {
4199    onEdit();
4200  }
4201};
4202
4203buttonsWrap.appendChild(editBtn);
4204
4205// Only allow the typed address when no suggestions were found
4206if (!hasSuggestions) {
4207  var useTypedBtn = document.createElement('button');
4208
4209  useTypedBtn.textContent = 'Use address I typed';
4210  useTypedBtn.style.flex = '1';
4211  useTypedBtn.style.border = '1px solid #ccc';
4212  useTypedBtn.style.borderRadius = '999px';
4213  useTypedBtn.style.padding = '8px 10px';
4214  useTypedBtn.style.fontSize = '13px';
4215  useTypedBtn.style.cursor = 'pointer';
4216  useTypedBtn.style.background = '#f5f5f5';
4217
4218  useTypedBtn.onclick = function () {
4219    overlay.remove();
4220
4221    if (typeof onUseTyped === 'function') {
4222      onUseTyped();
4223    }
4224  };
4225
4226  buttonsWrap.appendChild(useTypedBtn);
4227}
4228
4229var editNote = document.createElement('div');
4230
4231editNote.textContent = hasSuggestions
4232  ? 'Only edit your address if you cannot find it in the list above.'
4233  : 'No matching address was found. Check your details or continue with the address you entered.';
4234
4235editNote.style.fontSize = '13px';
4236editNote.style.fontWeight = '600';
4237editNote.style.textAlign = 'center';
4238editNote.style.color = hasSuggestions ? '#3044c5' : '#e53935';
4239editNote.style.margin = '8px 0';
4240
4241box.appendChild(editNote);
4242box.appendChild(buttonsWrap);
4243      overlay.appendChild(box);
4244      document.body.appendChild(overlay);
4245    };
4246
4247    function getFixedPriceFromTypexClient(typex, portion) {
4248  var rawTypex = String(typex || "").trim().toLowerCase();
4249  var rawPortion = String(portion || "").toLowerCase();
4250
4251  if (rawTypex.indexOf("fixed_") !== 0) return null;
4252
4253  var config = rawTypex.slice(6);
4254
4255  // fixed_1.99
4256  if (config.indexOf(":") === -1 && config.indexOf("|") === -1) {
4257    var fixedOne = parseFloat(config);
4258    if (isFinite(fixedOne)) return +fixedOne.toFixed(2);
4259  }
4260
4261  // fixed_9:1.99|12:2.99
4262  var portionMatch = rawPortion.match(/\d+(\.\d+)?/);
4263  if (!portionMatch) return null;
4264
4265  var portionNumber = portionMatch[0];
4266  var pairs = config.split("|");
4267
4268  for (var i = 0; i < pairs.length; i++) {
4269    var parts = pairs[i].split(":");
4270    if (parts.length !== 2) continue;
4271
4272    var sizeKey = String(parts[0]).trim().toLowerCase();
4273    var price = parseFloat(parts[1]);
4274
4275    if (sizeKey === portionNumber && isFinite(price)) {
4276      return +price.toFixed(2);
4277    }
4278  }
4279
4280  return null;
4281}
4282
4283function isBogoEligibleClient(item) {
4284  if (!item) return false;
4285  if (item.name === "Delivery Fee") return false;
4286  if (item.typex == null) return false;
4287
4288  const rawTypex = String(item.typex).trim().toLowerCase();
4289  if (rawTypex === "" || rawTypex === "no") return false;
4290  if (rawTypex.indexOf("fixed_") === 0) return true;
4291
4292  const pct = parseFloat(rawTypex);
4293  return isFinite(pct) && pct >= 0 && pct <= 100;
4294}
4295
4296// function getPromoGroupKeyClient(item) {
4297//   let divider = parseInt(item.divider, 10);
4298//   if (!isFinite(divider) || divider <= 0) divider = 2;
4299
4300//   const portion = String(item.portion || "").trim().toLowerCase();
4301
4302//   return divider + "|" + portion;
4303// }
4304
4305function getPromoGroupKeyClient(item) {
4306  let divider = parseInt(item.divider, 10);
4307  if (!isFinite(divider) || divider <= 0) divider = 2;
4308
4309  const rawTypex = String(item.typex || "").trim().toLowerCase();
4310  const portion = String(item.portion || "").trim().toLowerCase();
4311
4312  if (rawTypex.indexOf("fixed_") === 0 && rawTypex.indexOf(":") !== -1) {
4313    return divider + "|" + rawTypex + "|" + portion;
4314  }
4315
4316
4317  return divider + "|" + rawTypex;
4318}
4319
4320 
4321
4322function getDiscountedBaseClient(item) {
4323  const rawTypex = String(item.typex || "").trim().toLowerCase();
4324
4325  if (rawTypex.indexOf("fixed_") === 0) {
4326    const fixedPrice = getFixedPriceFromTypexClient(item.typex, item.portion);
4327    if (fixedPrice !== null) return fixedPrice;
4328
4329    return Number(item.rPrice || item.basePrice || 0);
4330  }
4331
4332  const pct = parseFloat(rawTypex);
4333  if (!isFinite(pct)) return Number(item.rPrice || item.basePrice || 0);
4334
4335  return Number((Number(item.rPrice || item.basePrice || 0) * (pct / 100)).toFixed(2));
4336}
4337
4338  </script>
4338
4339  
4340
4341
4342 
4343
4344<div id="infoModal" class="info-modal">
4345  <div class="info-modal-backdrop"></div>
4346
4347  <div class="info-modal-dialog">
4348    <button class="info-modal-close" type="button">&times;</button>
4349
4350    <div class="info-modal-header">
4351      <h2 id="infoTitle"></h2>
4352      <span id="infoPrice"></span>
4353    </div>
4354
4355    <div class="info-modal-body">
4356      <p id="infoDesc"></p>
4357    </div>
4358  </div>
4359</div>
4360
4361 
4362<script>
4363  window.BRANCH_INFO = {"salads":"Lettuce,Cucumber,Tomatoes, Red Cabbage,Onion,Coleslaw,Pickled Peppers,Mixed Salad","sauces":"Ketchup,Mayonnaise,Chilli Sauce,Garlic Sauce,Mint Sauce,BBQ Sauce,Burger Sauce","dips":"Garlic Sauce,Chilli Sauce,Mint Sauce,BBQ Sauce,Beans Sauce,Coleslaw,Gravy Sauce,Curry Sauce,Burger Sauce","toppings":"[{\"topping\":\"Ham\",\"class\":\"1\"},{\"topping\":\"Pepperoni\",\"class\":\"1\"},{\"topping\":\"Spicy Chicken\",\"class\":\"1\"},{\"topping\":\"Spicy Beef\",\"class\":\"1\"},{\"topping\":\"Bacon\",\"class\":\"1\"},{\"topping\":\"Chicken Doner\",\"class\":\"1\"},{\"topping\":\"Lamb Doner\",\"class\":\"1\"},{\"topping\":\"Mushroom\",\"class\":\"2\"},{\"topping\":\"Pineapple\",\"class\":\"2\"},{\"topping\":\"Sweetcorn\",\"class\":\"2\"},{\"topping\":\"Onions\",\"class\":\"2\"},{\"topping\":\"Mix Peppers\",\"class\":\"2\"},{\"topping\":\"Jalapeños\",\"class\":\"2\"},{\"topping\":\"Tomato\",\"class\":\"2\"},{\"topping\":\"Peppers\",\"class\":\"2\"},{\"topping\":\"Cheese\",\"class\":\"4\"}]","cans":"7up Can,Pepsi Can,Diet Pepsi Can,Pepsi Max, Rio Can , Dr Pepper Can , Orange Tango Can, Apple Tango Can","bottles":"Pepsi 1.5L,7Up 1.5L,Tango Orange 1.5L,Diet Pepsi 1.5L","toppingPrices":"1.00,2.00,2.80","stuffed":"no|no","kids":"Orange,Blackcurrant","pizzaNames":"Margherita,BBQ Pizza,Garlic Pizza,Chicken & Mushroom,Chicken & Bacon,Chicken & Sweetcorn,Ham & Bacon,Hawaiian,Farmhouse,Pepperoni Supreme,Classic Pizza,Hot One Hot,BBQ Original Experience,New York City Hot,Meat Feast,The Best of Seven,Mighty Meaty,The Sizzler Hot,Mixed Doner Pizza,Sweet Herbie,House Special,Veggie","maximumToppings":"4","kebabNames":"Doner Kebab,Chicken Doner Kebab","sides":"1/4 Cheese Burger,Chicken Burger,Veggie Burger,Chicken Meat in Bun,Donner Meat in Bun","etoppings1":"","etoppings2":"","etoppings3":"","etoppings3Prices":"","extraAll":"[{\"extra\":\"Add Fried Peppers\",\"price\":\"1.50\",\"type\":\"slicebacon\",\"id\":\"0\"},{\"extra\":\"Add Fried Onion\",\"price\":\"1.50\",\"type\":\"addonion\",\"id\":\"1\"},{\"extra\":\"Add Fried Mushrooms\",\"price\":\"1.50\",\"type\":\"addmushrooms\",\"id\":\"2\"},{\"extra\":\"Add Grated Cheese\",\"price\":\"1.50\",\"type\":\"addgcheese\",\"id\":\"3\"},{\"extra\":\"Add Chips\",\"price\":\"3.00\",\"type\":\"addchips\",\"id\":\"4\"},{\"extra\":\"Extra Slice Cheese\",\"price\":\"0.20\",\"type\":\"Extra Slice Cheese\",\"id\":\"5\"}]","etoppings1Prices":"","headerAvailable":"1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0","bases":"BBQ Base,Garlic Base","boxt":"checkbox,checkbox","cheesePrice":"1.50","bcheesePrice":"0.20","seperate":"no","headerNames":"Meal Deals,Mega Deals,Pizza Offers,Pizzas,Kebabs,Combinations,Wraps,Extra Dishes,Burgers,Fried Chicken,Sides,Kids Corner,Drinks,Desserts,Sauces,custom","shopClosing":"21,23,23,23,23,23,23","deliveryStart":"16,16,16,16,16,16,16","collectionStart":"15,15,16,16,16,15,15","opendays":"15:00,Closed,16:00,16:00,16:00,15:00,15:00","closeReason":"Out of Delivery Hours","situation":"Delivery","maxSauces":"2","closeddays":"21:00,Closed,22:30,22:30,22:30,22:30,22:30","extraTypes":"","swaptop":0,"makeMeal":"0","elist":"Potato Wedges,Onion Rings","elistx":"","campaignText":"no","mmList":"Chips"};
4364</script>
4364
4365
4366
4367 
4368<script src="/js/orderFunctions2.js?v=12" defer></script>
4368
4369 
4370<script>
4371  
4372// var savedScrollY = 0;
4373
4374// $(document).on('show.bs.modal', '#invokeMyModal', function () {
4375//     savedScrollY = window.pageYOffset;
4376
4377//     $('body').css({
4378//         position: 'fixed',
4379//         top: -savedScrollY + 'px',
4380//         width: '100%'
4381//     });
4382// });
4383
4384// $(document).on('hidden.bs.modal', '#invokeMyModal', function () {
4385//     $('body').css({
4386//         position: '',
4387//         top: '',
4388//         width: ''
4389//     });
4390
4391//     window.scrollTo(0, savedScrollY);
4392// });
4393
4394
4395  function openInfoModal(dataexp) {
4396    //e.stopPropagation(); // <- stops .menu-item click
4397
4398   
4399    $('#infoDesc').text(dataexp || '');
4400    $('#infoModal').fadeIn(150);
4401}
4402
4403
4404 
4405$(document).on('shown.bs.modal', '#invokeMyModal', function () {
4406    centerInvokeModal();
4407});
4408
4409function centerInvokeModal() {
4410  var $modal  = $('#invokeMyModal');
4411    var $dialog = $modal.find('.modal-dialog');
4412
4413    if (!$dialog.length) return;
4414
4415    // Remove any previous mode so we can measure correctly
4416    $dialog.removeClass('modal-centered modal-top');
4417    $dialog.css({ top: '', transform: '' });
4418
4419    // Force a reflow so heights are up to date
4420    var winH = $(window).height();
4421    var dlgH = $dialog.outerHeight(true);
4422
4423    // If dialog is smaller than viewport (with a bit of padding),
4424    // center it. Otherwise pin it near the top.
4425    if (dlgH + 40 <= winH) {
4426        $dialog.addClass('modal-centered');
4427    } else {
4428        $dialog.addClass('modal-top');
4429    }
4430}
4431
4432 
4433
4434 
4435  // Close button stuff (unchanged, but with a small safety guard)
4436  const closeButton = document.getElementById('close-btn');
4437  const discountBubble = document.getElementById('discount-bubble');
4438
4439  if (closeButton && discountBubble) {
4440    closeButton.addEventListener('click', function () {
4441      discountBubble.style.opacity = '0';
4442      setTimeout(function () {
4443        discountBubble.style.display = 'none';
4444      }, 300);
4445    });
4446  }
4447
4448  // --- NEW: safe init for branchInformation ---
4449window.showBoostJsErrorModal = function (message) {
4450    // Avoid duplicates
4451    var existing = document.getElementById('boost-js-error-overlay');
4452    if (existing) return;
4453
4454    // Overlay background
4455    var overlay = document.createElement('div');
4456    overlay.id = 'boost-js-error-overlay';
4457    overlay.style.position = 'fixed';
4458    overlay.style.inset = '0';
4459    overlay.style.background = 'rgba(0, 0, 0, 0.6)';
4460    overlay.style.zIndex = '999999';
4461    overlay.style.display = 'flex';
4462    overlay.style.alignItems = 'center';
4463    overlay.style.justifyContent = 'center';
4464
4465    // Modal box
4466    var box = document.createElement('div');
4467    box.style.background = '#ffffff';
4468    box.style.borderRadius = '10px';
4469    box.style.padding = '18px 20px';
4470    box.style.maxWidth = '320px';
4471    box.style.width = '80%';
4472    box.style.boxShadow = '0 8px 20px rgba(0,0,0,0.3)';
4473    box.style.textAlign = 'center';
4474    box.style.fontFamily = 'system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif';
4475
4476    var title = document.createElement('div');
4477    title.textContent = 'Oops…';
4478    title.style.fontWeight = '700';
4479    title.style.fontSize = '18px';
4480    title.style.marginBottom = '8px';
4481
4482    var msg = document.createElement('div');
4483    msg.textContent = message || 'We had trouble loading the menu. Please reload this page.';
4484    msg.style.fontSize = '14px';
4485    msg.style.marginBottom = '14px';
4486
4487    var btn = document.createElement('button');
4488    btn.textContent = 'Reload';
4489    btn.style.border = 'none';
4490    btn.style.borderRadius = '999px';
4491    btn.style.padding = '8px 20px';
4492    btn.style.fontSize = '14px';
4493    btn.style.fontWeight = '600';
4494    btn.style.cursor = 'pointer';
4495    btn.style.background = '#e53935';
4496    btn.style.color = '#fff';
4497    btn.onclick = function () {
4498      location.reload();
4499    };
4500
4501    box.appendChild(title);
4502    box.appendChild(msg);
4503    box.appendChild(btn);
4504    overlay.appendChild(box);
4505    document.body.appendChild(overlay);
4506  };
4507
4508  function createItem(itemIds, itemPortion, orders, itemName) {
4509
4510    alertUser("hrd");
4511    currentStep = 1;
4512
4513    var formModal = "";
4514    var itemid = "no";
4515    var itemIdsText = String(itemIds);
4516
4517    if (parseInt(itemIds)) {
4518        itemid = itemIds;
4519    }
4520
4521    var isItemGroup =
4522        itemIdsText == "Pizza" ||
4523        itemIdsText == "Kebab" ||
4524        itemIdsText == "Sides" ||
4525        itemIdsText == "Bottle" ||
4526        itemIdsText == "Can" ||
4527        itemIdsText == "Dip" ||
4528        itemIdsText == "Kids" ||
4529        itemIdsText == "Other" ||
4530        itemIdsText == "Otherx" ||
4531        itemIdsText.includes("Eextra") ||
4532        itemIdsText.includes("Elist");
4533
4534    /*
4535     * Keep the "steps" class because firstStep() and revealStep()
4536     * use it. The new offer-step-row class controls the layout.
4537     */
4538    formModal +=
4539        '<div class="steps offer-step-row" id="step' +
4540        orders +
4541        '">';
4542
4543    formModal +=
4544        '<input id="itemPortionz' +
4545        orders +
4546        '" value="' +
4547        itemPortion +
4548        '" style="display:none;">';
4549
4550    /*
4551     * Step number
4552     */
4553    formModal +=
4554        '<div class="offer-step-number stepNumbers">' +
4555        orders +
4556        ".</div>";
4557
4558    /*
4559     * Category/group choice:
4560     * Pizza, Kebab, Sides, Can, etc.
4561     */
4562    if (isItemGroup) {
4563        var items = window[itemIdsText + "Names"] || [];
4564
4565        formModal += '<div class="offer-step-select">';
4566
4567        formModal +=
4568            '<select class="form-control itemOffers" ' +
4569            'id="offerName' +
4570            orders +
4571            '" ' +
4572            'onchange="bringSelected(\'' +
4573            orders +
4574            "','" +
4575            itemPortion +
4576            "','" +
4577            itemid +
4578            "');\">";
4579
4580        formModal +=
4581            '<option value="" disabled selected hidden>' +
4582            "Please Choose..." +
4583            "</option>";
4584
4585        for (var i = 0; i < items.length; ++i) {
4586            formModal +=
4587                '<option value="' +
4588                items[i] +
4589                '">' +
4590                items[i] +
4591                "</option>";
4592        }
4593
4594        formModal += "</select>";
4595        formModal += "</div>";
4596
4597        /*
4598         * Customize button
4599         */
4600        formModal += '<div class="offer-step-customize">';
4601
4602        formModal +=
4603            '<button type="button" class="offer-customize-button" ' +
4604            'onclick="revealStep(' +
4605            orders +
4606            ')">' +
4607            "Customize" +
4608            "</button>";
4609
4610        formModal += "</div>";
4611    }
4612
4613    /*
4614     * Fixed individual item
4615     */
4616    else {
4617        var myData = $("#foodItem" + itemIds).data("json");
4618
4619        if (!myData || !myData.itemName) {
4620            sendSystemLog(
4621                "Offer item unavailable | ID: " +
4622                itemIds +
4623                " | Portion: " +
4624                itemPortion +
4625                " | Step: " +
4626                orders +
4627                " | ItemName: " +
4628                itemName,
4629                itemName
4630            );
4631
4632            return "";
4633        }
4634
4635        formModal += '<div class="offer-step-select">';
4636
4637        formModal +=
4638            '<select class="form-control itemOffers" ' +
4639            'id="offerName' +
4640            orders +
4641            '" ' +
4642            'onchange="bringSelected(\'' +
4643            orders +
4644            "','" +
4645            itemPortion +
4646            "','" +
4647            itemid +
4648            "');\">" +
4649            '<option value="' +
4650            myData.itemName +
4651            '" selected>' +
4652            myData.itemName +
4653            "</option>" +
4654            "</select>";
4655
4656        formModal += "</div>";
4657
4658        /*
4659         * Customize button
4660         */
4661        formModal += '<div class="offer-step-customize">';
4662
4663        formModal +=
4664            '<button type="button" class="offer-customize-button" ' +
4665            "onclick=\"revealStep('" +
4666            orders +
4667            "','" +
4668            itemPortion +
4669            "','" +
4670            itemid +
4671            "')\">" +
4672            "Customize" +
4673            "</button>";
4674
4675        formModal += "</div>";
4676    }
4677
4678    /*
4679     * Completed/customised status icon
4680     */
4681    formModal += '<div class="offer-step-status">';
4682
4683    formModal +=
4684        '<div id="itemOptionsStep' +
4685        orders +
4686        '" style="display:none;">' +
4687        '<i class="fa fa-icon-steps icon-basket-general"></i>' +
4688        "</div>";
4689
4690    formModal += "</div>";
4691
4692    formModal += "</div>";
4693
4694    return formModal;
4695}
4696
4697  function boostShowItemInfo(titleText, messageText) {
4698    // Avoid multiple overlays
4699    if(messageText.length<3){return;}
4700    var existing = document.getElementById('boost-iteminfo-overlay');
4701    if (existing) existing.remove();  // remove old one so we can reuse
4702
4703    // Overlay background
4704    var overlay = document.createElement('div');
4705    overlay.id = 'boost-iteminfo-overlay';
4706    overlay.style.position = 'fixed';
4707    overlay.style.inset = '0';
4708    overlay.style.background = 'rgba(0, 0, 0, 0.6)';
4709    overlay.style.zIndex = '999999';
4710    overlay.style.display = 'flex';
4711    overlay.style.alignItems = 'center';
4712    overlay.style.justifyContent = 'center';
4713
4714    // Modal box
4715    var box = document.createElement('div');
4716    box.style.background = '#ffffff';
4717    box.style.borderRadius = '10px';
4718    box.style.padding = '18px 20px';
4719    box.style.maxWidth = '360px';
4720    box.style.width = '80%';
4721    box.style.boxShadow = '0 8px 20px rgba(0,0,0,0.3)';
4722    box.style.textAlign = 'center';
4723    box.style.fontFamily = 'system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif';
4724    box.style.position = 'relative';
4725
4726    // Close (X)
4727    var close = document.createElement('div');
4728    close.textContent = '×';
4729    close.style.position = 'absolute';
4730    close.style.top = '8px';
4731    close.style.right = '12px';
4732    close.style.cursor = 'pointer';
4733    close.style.fontSize = '22px';
4734    close.style.lineHeight = '1';
4735    close.onclick = function () {
4736        overlay.remove();
4737    };
4738
4739
4740      const clean = s => {
4741        if (!s) return "";
4742        return String(s)
4743            .replace(/\\"/g, '"')       // convert \" → "
4744            .replace(/\\'/g, "'")       // convert \' → '
4745            .replace(/&quot;/g, '"')    // convert HTML quotes
4746            .replace(/&#39;/g, "'")     // convert HTML apostrophes
4747            .replace(/\s+/g, ' ')       // normalise weird spacing
4748            .trim();
4749    };
4750
4751    var title = document.createElement('div');
4752    title.textContent = clean(titleText) || '';
4753    title.style.fontWeight = '700';
4754    title.style.fontSize = '18px';
4755    title.style.marginBottom = '6px';
4756
4757    // if (priceText) {
4758    //     var price = document.createElement('div');
4759    //     price.textContent = priceText;
4760    //     price.style.fontWeight = '600';
4761    //     price.style.fontSize = '15px';
4762    //     price.style.color = '#e53935';
4763    //     price.style.marginBottom = '6px';
4764    //     box.appendChild(price);
4765    // }
4766
4767    var msg = document.createElement('div');
4768    msg.textContent = clean(messageText) || '';
4769    msg.style.fontSize = '14px';
4770    msg.style.marginTop = '4px';
4771
4772    var btn = document.createElement('button');
4773    btn.textContent = 'Close';
4774    btn.style.border = 'none';
4775    btn.style.borderRadius = '999px';
4776    btn.style.padding = '8px 22px';
4777    btn.style.fontSize = '14px';
4778    btn.style.fontWeight = '600';
4779    btn.style.cursor = 'pointer';
4780    btn.style.background = '#e53935';
4781    btn.style.color = '#fff';
4782    btn.style.marginTop = '14px';
4783
4784    btn.onclick = function () {
4785        overlay.remove();
4786    };
4787
4788    // Clicking on dark background also closes
4789    overlay.addEventListener('click', function (e) {
4790        if (e.target === overlay) overlay.remove();
4791    });
4792
4793    box.appendChild(close);
4794    box.appendChild(title);
4795    box.appendChild(msg);
4796    box.appendChild(btn);
4797    overlay.appendChild(box);
4798
4799    document.body.appendChild(overlay);
4800}
4801
4802  function safeInitBranchInformation(retries) {
4803    if (typeof window.branchInformation === 'function') {
4804      try {
4805        branchInformation();
4806      } catch (e) {
4807        // optional: Sentry.captureException(e);
4808      }
4809    } else if (retries > 0) {
4810      setTimeout(function () {
4811        safeInitBranchInformation(retries - 1);
4812      }, 500); // retry every 0.5s
4813    } else {
4814      // After all retries, still missing → warn user
4815      showBoostJsErrorModal();
4816    }
4817  }
4818
4819  $(document).ready(function () {
4820    // Try for ~8 seconds total (16 * 500ms)
4821    safeInitBranchInformation(16);
4822
4823    // keep your existing behaviour
4824    $("#menuhxy").removeAttr("href").css("cursor", "pointer");
4825 
4826  });
4827 
4828
4829  $(document).on('click', "a[href='#menus']", function () {
4830    $("html, body").animate({ scrollTop: 0 }, "slow");
4831    return false;
4832  });
4833 
4834  function branchItems() {
4835    $.ajax({
4836        type: "GET",
4837        url: "/branchItems",
4838
4839        success: function (response) {},
4840
4841        error: function (response) {
4842            alert("error");
4843        },
4844
4845        complete: function (response) {
4846            var items = response.responseJSON || [];
4847            var body = "";
4848            var prices = [];
4849
4850            for (var i = 0; i < items.length; ++i) {
4851                try {
4852                    items[i].menuHeader =
4853                        (items[i].menuHeader || "")
4854                        .split(" ")
4855                        .join("");
4856                } catch (e) {}
4857
4858                prices = String(items[i].prices || "").split(",");
4859
4860                var itemJson = JSON.stringify(items[i] || {});
4861                var explanation = items[i].explanation || "";
4862
4863                /*
4864                 * Manual explanation handling:
4865                 * Short explanation: show everything, no (i)
4866                 * Long explanation: shorten it and show (i)
4867                 */
4868                var explanationLimit = 55;
4869                var showInfo = explanation.length > explanationLimit;
4870
4871                var visibleExplanation = explanation;
4872
4873                if (showInfo) {
4874                    visibleExplanation =
4875                        explanation.substring(0, explanationLimit).trim() +
4876                        "...";
4877                }
4878
4879                /*
4880                 * Keep the same encoding expected by
4881                 * your existing boostShowItemInfo function.
4882                 */
4883                var explanationJs = JSON.stringify(explanation);
4884
4885                /*
4886                 * Miscellaneous custom item
4887                 */
4888                if (items[i].misc == "yes") {
4889                    body +=
4890                        '<div class="slide flickity col-lg-3 col-xs-6 ' +
4891                        'col-xs-6xx custombox ' +
4892                        items[i].menuHeader +
4893                        '" style="max-height:unset; height:unset;">';
4894
4895                    body +=
4896                        '<div class="wrapItems" ' +
4897                        'onclick="invokeItem(this.id);" ' +
4898                        "data-json='" +
4899                        itemJson +
4900                        "' " +
4901                        'id="foodItem' +
4902                        items[i].id +
4903                        '">';
4904
4905                    body +=
4906                        '<img src="' +
4907                        (items[i].image || "") +
4908                        '" alt="" style="border-radius:10px;">';
4909
4910                    body += "</div></div>";
4911                    continue;
4912                }
4913
4914                /*
4915                 * Normal product card
4916                 */
4917                if (items[i].availability == 0) {
4918                    body +=
4919                        '<div class="slide flickity col-lg-3 col-xs-6 ' +
4920                        "col-xs-6xx " +
4921                        items[i].menuHeader +
4922                        '">';
4923
4924                    body +=
4925                        '<div class="wrapItems" ' +
4926                        'onclick="notavailable();" ' +
4927                        "data-json='" +
4928                        itemJson +
4929                        "' " +
4930                        'id="foodItem' +
4931                        items[i].id +
4932                        '">';
4933
4934                    body +=
4935                        '<i class="fa fa-icon-minusItem ' +
4936                        'icon-basket-general basketxx"></i>';
4937                } else {
4938                    body +=
4939                        '<div class="slide flickity col-lg-3 col-xs-6 ' +
4940                        "col-xs-6xx " +
4941                        items[i].menuHeader +
4942                        '">';
4943
4944                    body +=
4945                        '<div class="wrapItems" ' +
4946                        'onclick="invokeItem(this.id);" ' +
4947                        "data-json='" +
4948                        itemJson +
4949                        "' " +
4950                        'id="foodItem' +
4951                        items[i].id +
4952                        '">';
4953
4954                    body += '<span class="add-icon">+</span>';
4955                }
4956
4957                /*
4958                 * Product image
4959                 */
4960                var menuImage = getMenuImage(items[i].image);
4961
4962                if (menuImage) {
4963                    body +=
4964                        '<img src="' +
4965                        menuImage +
4966                        '" alt="" width="139" height="117" ' +
4967                        'class="menuImage">';
4968                } else {
4969                    body +=
4970                        '<div class="menuImage menuImageBlank"></div>';
4971                }
4972
4973                /*
4974                 * Name and explanation
4975                 */
4976                body += '<div class="wrapfmodals">';
4977
4978                body +=
4979                    '<h3 class="itemNames" ' +
4980                    'listname="' +
4981                    (items[i].itemName || "") +
4982                    '" ' +
4983                    'itemid="' +
4984                    items[i].id +
4985                    '">' +
4986                    (items[i].itemName || "") +
4987                    "</h3>";
4988
4989                if (visibleExplanation) {
4990                    body +=
4991                        '<p class="explainP">' +
4992                        visibleExplanation +
4993                        "</p>";
4994                }
4995
4996                /*
4997                 * Only show (i) when explanation was shortened
4998                 */
4999                if (showInfo) {
5000                    body +=
5001                        '<i class="fa fa-info ' +
5002                        'icon-classes-general2 icon-infoxx" ' +
5003                        "onclick='boostShowItemInfo(" +
5004                        JSON.stringify(items[i].itemName) +
5005                        "," +
5006                        JSON.stringify(explanationJs) +
5007                        ")'> (i)</i>";
5008                }
5009
5010                body += "</div>";
5011
5012                /*
5013                 * Prices
5014                 */
5015               var validPrices = prices.filter(function (price) {
5016    return price &&
5017           !isNaN(parseFloat(price)) &&
5018           parseFloat(price) > 0;
5019});
5020
5021body += '<strong class="txt-default explainItem">';
5022
5023if (validPrices.length === 1) {
5024    body += "£" + validPrices[0];
5025}
5026else if (validPrices.length > 1) {
5027    body +=
5028        "£" + validPrices[0] +
5029        "–£" + validPrices[validPrices.length - 1];
5030}
5031
5032body += "</strong>";
5033
5034                body += "</div>";
5035                body += "</div>";
5036            }
5037
5038            $("#slider").html(body);
5039
5040            $(".current").removeClass("current");
5041            $(this).addClass("current");
5042
5043            $(document).ready(function () {
5044                if ($(".hheads").length) {
5045                    $(".hheads")[0].click();
5046                }
5047
5048                if ($(window).width() < 1120) {
5049                    var link = $("#innerdiv").height();
5050
5051                    $("#slider").css(
5052                        "margin-top",
5053                        link + 43 + "px"
5054                    );
5055
5056                    if (ete == 1) {
5057                        $("#innerdiv").css("margin-top", "7%");
5058                    } else {
5059                        $("#innerdiv").css("margin-top", "-22px");
5060                    }
5061                }
5062
5063                if (
5064                    typeof campaignText !== "undefined" &&
5065                    campaignText &&
5066                    campaignText !== "no" &&
5067                    !campaignText.includes(
5068                        "Special prices on our app"
5069                    )
5070                ) {
5071                    $("#campaignText").html(campaignText);
5072                    $("#discount-bubble").show();
5073                }
5074            });
5075        }
5076    });
5077}
5078
5079
5080 
5081 
5082
5083function showDisplayDebug() {
5084    var vv = window.visualViewport;
5085
5086    var debugInfo =
5087        "innerWidth: " + window.innerWidth +
5088        "<br>\ninnerHeight: " + window.innerHeight +
5089        "<br>\nscreen.width: " + window.screen.width +
5090        "<br>\nscreen.height: " + window.screen.height +
5091        "<br>\nDPR: " + window.devicePixelRatio +
5092        "<br>\nviewport.width: " + (vv ? vv.width : "N/A") +
5093        "<br>\nviewport.height: " + (vv ? vv.height : "N/A") +
5094        "<br>\nviewport.scale: " + (vv ? vv.scale : "N/A") +
5095        "<br>\nroot font: " +
5096        getComputedStyle(document.documentElement).fontSize +
5097        "\nbody font: " +
5098        getComputedStyle(document.body).fontSize;
5099
5100    alertUser(debugInfo);
5101}
5102
5103 
5104
5105  var forceJpgForWebView = false;
5106
5107function getMenuImage(image) {
5108    image = image || "";
5109
5110    // Empty image, data placeholder or no-image placeholder
5111    if (
5112        !image ||
5113        image.startsWith("data:image") ||
5114        image.includes("/images/noimage.png")
5115    ) {
5116        return "";
5117    }
5118
5119    // Only force JPG inside the iOS WebView
5120    if (
5121        forceJpgForWebView &&
5122        !image.includes("format=")
5123    ) {
5124        image += image.includes("?")
5125            ? "&format=jpg"
5126            : "?format=jpg";
5127    }
5128
5129    return image;
5130}
5131// close on X or backdrop
5132$(document).on('click', '.info-modal-close, .info-modal-backdrop', function () {
5133    $('#infoModal').fadeOut(150);
5134});
5135
5136 
5137</script>
5137
5138
5139<!-- Compatibility mode for Android/iOS large system text. -->
5140<script>
5141(function () {
5142    function updateSystemTextMode() {
5143        var rootSize =
5144            parseFloat(getComputedStyle(document.documentElement).fontSize) || 10;
5145
5146        var root = document.documentElement;
5147
5148        root.classList.remove(
5149            'large-system-text',
5150            'extreme-system-text'
5151        );
5152
5153        if (rootSize >= 15) {
5154            root.classList.add(
5155                'large-system-text',
5156                'extreme-system-text'
5157            );
5158        }
5159        else if (rootSize > 10.5) {
5160            root.classList.add('large-system-text');
5161        }
5162
5163        console.log(
5164            'root font:',
5165            rootSize,
5166            'mode:',
5167            root.className
5168        );
5169    }
5170
5171    updateSystemTextMode();
5172    window.addEventListener('resize', updateSystemTextMode);
5173})();
5174</script>
5174
5175
5176<style>
5177/* Phase 1: stop product-card text collisions without changing normal phones. */
5178@media (max-width: 420px) {
5179  .large-system-text #slider {
5180    display: flex;
5181    flex-wrap: wrap;
5182    align-items: stretch;
5183  }
5184
5185  .large-system-text #slider .col-xs-6xx {
5186    display: flex;
5187    width: 47% !important;
5188    height: auto !important;
5189    max-height: none !important;
5190    min-height: 0;
5191    margin: 1.5% !important;
5192  }
5193
5194  .large-system-text #slider .wrapItems {
5195    display: flex;
5196    flex: 1 1 auto;
5197    flex-direction: column;
5198    width: 100%;
5199    min-width: 0;
5200    height: auto;
5201    padding-bottom: 8px;
5202  }
5203
5204  .large-system-text #slider .menuImage {
5205    width: min(139px, calc(100% - 18px));
5206    height: auto;
5207    aspect-ratio: 139 / 117;
5208    object-fit: contain;
5209    margin: 3px auto 0;
5210  }
5211
5212  .large-system-text #slider .wrapfmodals {
5213    display: flex;
5214    flex: 1 1 auto;
5215    flex-direction: column;
5216    min-width: 0;
5217  }
5218
5219  .large-system-text #slider .itemNames {
5220    height: auto;
5221    min-height: 0;
5222    max-height: none;
5223    min-width: 0;
5224    margin: 7px 4px 4px !important;
5225    line-height: 1.12;
5226    overflow-wrap: anywhere;
5227  }
5228
5229  .large-system-text #slider .explainP {
5230    display: block;
5231    width: auto;
5232    height: auto;
5233    min-height: 0;
5234    max-height: none;
5235    margin: 0 5px 6px;
5236    padding: 0;
5237    line-height: 1.2;
5238    overflow: visible;
5239    overflow-wrap: anywhere;
5240  }
5241
5242  .large-system-text #slider .explainItem {
5243    position: static;
5244    display: block;
5245    height: auto;
5246    min-height: 0;
5247    margin: auto 4px 0;
5248    padding-top: 4px;
5249    line-height: 1.15;
5250    overflow-wrap: anywhere;
5251  }
5252
5253  .large-system-text #slider .icon-infoxx {
5254    position: static;
5255    display: inline-block;
5256    margin: 0 0 4px;
5257  }
5258}
5259</style>
5260
5261<script type="module" src="https://static.cloudflareinsights.com/beacon.min.js/v31edd6df95cf4e85bb4c19e7a9bdbcba1788362987495" integrity="sha512-iIg7k2xntmwu6/uSb5tpc/hySgZc4eoL31yB29W6tJFo2akwjPWcEqnCEdJvGexCL0KEQwVYv5BlowfhVz26hg==" data-cf-beacon='{"version":"2024.11.0","token":"83e4e7cc143f480dbad8c35e0fb37923","r":1,"spa":2}' crossorigin="anonymous"></script>
5261
5262</body>
5263</html>
5264  
5265   

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.