index.html 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567
  1. <!DOCTYPE html>
  2. <html lang="es">
  3. <head>
  4. <meta charset="UTF-8" />
  5. <title>Biergarten Klein</title>
  6. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  7. <!-- Meta tags para evitar cache -->
  8. <meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate">
  9. <meta http-equiv="Pragma" content="no-cache">
  10. <meta http-equiv="Expires" content="0">
  11. <!-- Fuentes + Tailwind -->
  12. <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
  13. <link rel="stylesheet" as="style" onload="this.rel='stylesheet'"
  14. href="https://fonts.googleapis.com/css2?display=swap&family=Noto+Sans:wght@400;500;700;900&family=Spline+Sans:wght@400;500;700">
  15. <script src="https://cdn.tailwindcss.com?plugins=forms,container-queries"></script>
  16. <link rel="stylesheet" href="express/animations.css">
  17. <!--Tailwind-->
  18. <script>
  19. tailwind.config = {
  20. theme: {
  21. extend: {
  22. colors: {
  23. 'custom-dark': '#101419',
  24. 'custom-dark-hover': '#37404a',
  25. 'gray-50': '#f9fafb',
  26. 'gray-100': '#f3f4f6',
  27. }
  28. }
  29. }
  30. }
  31. </script>
  32. <!-- Markdown -->
  33. <script src="https://cdn.jsdelivr.net/npm/marked/marked.min.js"></script>
  34. <script src="express/js/app.js" type="module"></script>
  35. <link rel="stylesheet" href="express/styles.css">
  36. </head>
  37. <body class="h-[100dvh] max-h-[100dvh] flex flex-col bg-gray-50 overflow-x-hidden"
  38. style='font-family:"Spline Sans","Noto Sans",sans-serif;'>
  39. <!-- ---------- HEADER ---------- -->
  40. <header class="flex-col top-0 inset-x-0 z-10 bg-gray-50 p-2 flex justify-center items-center border-b border-gray-200">
  41. <h1 id="mainTitle" class="text-[26px] font-bold text-[#101419] tracking-tight">
  42. Biergarten Klein
  43. </h1>
  44. </header>
  45. <!-- ---------- MAIN ---------- -->
  46. <main class="relative flex-1 flex flex-col min-h-0 overflow-x-hidden">
  47. <!-- ===== MENÚ tab ===== -->
  48. <section id="menuTab" data-index="0" class="min-h-0 overflow-y-auto h-full" data-tab>
  49. <div class="pt-4 pb-3">
  50. <!-- Barra de progreso para cerveza gratis -->
  51. <div class="mx-4 mb-6 p-4 bg-gradient-to-r from-amber-50 to-orange-50 rounded-xl border border-amber-200">
  52. <div class="flex items-center justify-between mb-2">
  53. <div class="flex items-center gap-2">
  54. <span class="text-lg">🍺</span>
  55. <span class="text-sm font-semibold text-amber-800">¡Cerveza gratis al 100%!</span>
  56. </div>
  57. <span id="progressText" class="text-sm font-bold text-amber-700">100%</span>
  58. </div>
  59. <div class="relative w-full h-3 bg-amber-100 rounded-full overflow-hidden shadow-inner">
  60. <!-- Barra de progreso animada -->
  61. <div id="progressBar" class="h-full bg-gradient-to-r from-amber-400 to-orange-500 rounded-full transition-all duration-500 ease-out shadow-sm relative overflow-hidden" style="width: 100%">
  62. <!-- Efecto de brillo -->
  63. <div class="absolute inset-0 bg-gradient-to-r from-transparent via-white/30 to-transparent skew-x-12 animate-pulse"></div>
  64. </div>
  65. <!-- Indicador de meta -->
  66. <div class="absolute right-1 top-1/2 transform -translate-y-1/2">
  67. <div class="w-2 h-2 bg-amber-600 rounded-full border border-white shadow-sm"></div>
  68. </div>
  69. </div>
  70. <div class="flex items-center justify-between mt-2">
  71. <span class="text-xs text-amber-700">Cada compra suma puntos</span>
  72. <button id="rewardBtn" class="text-xs bg-amber-500 hover:bg-amber-600 text-white px-3 py-1 rounded-full font-medium transition-colors duration-200 opacity-50 cursor-not-allowed" disabled>
  73. 🎉 ¡Reclamar!
  74. </button>
  75. </div>
  76. </div>
  77. </div>
  78. <div class="px-4 overflow-y-auto">
  79. <input type="text" id="searchInput" placeholder="Buscar..." class="w-full px-4 py-2 mb-4 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-[#101419]">
  80. <ul id="productList" class="space-y-6">
  81. </ul>
  82. </div>
  83. <template id="product-card-template">
  84. <li class="flex items-stretch justify-between gap-4 rounded-xl">
  85. <div class="flex flex-[2_2_0px] flex-col gap-4">
  86. <div class="flex flex-col gap-1">
  87. <p class="product-type text-[#58728d] text-sm"></p>
  88. <p class="product-name text-[#101419] text-base font-bold leading-tight"></p>
  89. <p class="product-description text-[#58728d] text-sm"></p>
  90. </div>
  91. <div class="flex items-center gap-3">
  92. <button class="add-to-cart-btn flex items-center gap-1 w-fit h-8 px-3 rounded-full bg-[#101419] hover:bg-[#37404a] text-white text-sm font-medium">
  93. <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="16" height="16" fill="currentColor">
  94. <path d="M12 5v14m7-7H5" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
  95. </svg>
  96. Añadir
  97. </button>
  98. <span class="product-price text-sm font-semibold text-[#101419]"></span>
  99. </div>
  100. </div>
  101. <div class="product-image flex-1 aspect-video bg-cover bg-center rounded-xl"></div>
  102. </li>
  103. </template>
  104. </section>
  105. <!-- ===== CHAT ===== -->
  106. <section id="chatTab" data-index="2" data-tab class="flex hidden flex-col h-full flex-1 min-h-0">
  107. <!-- Contenedor de mensajes que puede crecer y hacer scroll -->
  108. <div id="chatContainer" class="flex flex-col h-full flex-1 bg-white border border-gray-200 rounded-xl shadow-sm m-4 overflow-hidden">
  109. <header>
  110. <div class="flex items-center justify-between px-4 py-3 border-b border-gray-200 bg-gray-50">
  111. <div id="onlineUsers" class="flex items-center gap-3"><span class="rounded-full bg-lime-500 w-2 h-2 inline-block shadow-md shadow-lime-300"></span><h4>4 Usuarios en linea</h4></div>
  112. </div>
  113. </header>
  114. <!-- Mensajes -->
  115. <div id="chatMessages" class="flex-1 overflow-y-auto px-4 py-3 space-y-1 bg-gray-50 font-mono text-sm">
  116. <!-- Mensajes de ejemplo estilo IRC -->
  117. <template id="chatMessageTemplate">
  118. <div class="chat-message"><span class="text-gray-400 chat-message-time">[00:36]</span> <span class="font-bold chat-message-user">&lt;JuanP_mesa5&gt;</span> <span class="chat-message-text">Yo también quiero!</span></div>
  119. </template>
  120. <template id="systemMessageTemplate">
  121. <div class="system-container"><span class="text-gray-400 chat-message-time">[14:24]</span> <span class="font-bold chat-message-text">*** Maria_mesa2 se ha unido al chat</span></div>
  122. </template>
  123. </div>
  124. <!-- Input y botón -->
  125. <form id="chatForm" class="flex flex-col relative gap-2 border-t border-gray-200 bg-white px-3 py-2" autocomplete="off">
  126. <ul id="userList" class="hidden absolute bottom-full w-3/4 rounded-lg border bg-gray-100 flex flex-col gap-2 py-2 px-2">
  127. </ul>
  128. <div class="flex gap-2 w-full">
  129. <input id="chatInput" type="text" placeholder="Escribe un mensaje..." class="flex-grow flex-1 px-4 py-2 rounded-lg border border-gray-300 focus:outline-none focus:ring-2 focus:ring-[#101419] text-sm bg-gray-50" autocomplete="off" maxlength="300" />
  130. <button id="chatSubmitButton" type="submit" class="bg-blue-500 flex-shrink text-white px-4 py-2 rounded-lg font-medium transition-colors duration-200">Enviar</button>
  131. </div>
  132. </form>
  133. </div>
  134. </section>
  135. <!-- ===== CARRITO ===== -->
  136. <section id="cartTab" data-tab data-index="1" class="flex flex-col hidden flex-1 min-h-0">
  137. <header class="p-4 border-b border-gray-200">
  138. <h3 class="text-lg font-bold text-[#101419]">Tu pedido</h3>
  139. </header>
  140. <div id="cartItems" class="flex-1 overflow-y-auto p-4 space-y-2 max-h-[25vh]"></div>
  141. <p id="emptyCartText" class="hidden text-center text-gray-400 mt-4">Tu carrito está vacío.</p>
  142. <footer class="p-4 border-t border-gray-200 space-y-3">
  143. <div class="flex justify-between text-base">
  144. <span>Total:</span>
  145. <span id="cartTotal">$0</span>
  146. </div>
  147. <button id="checkoutButton"
  148. class="w-full bg-[#101419] hover:bg-[#37404a] disabled:opacity-50 text-white py-2 rounded-md"
  149. disabled>
  150. Envia tu orden
  151. </button>
  152. </footer>
  153. <div class="max-w-4xl mx-auto bg-white rounded-xl shadow-sm border border-gray-200 overflow-hidden">
  154. <!-- Header con nombre de usuario -->
  155. <div class="bg-gray-50 px-6 py-2 border-b border-gray-200">
  156. <h2 id="usernameTable" class="text-[19px] font-bold text-[#101419]">Pedido de Juan Pérez</h2>
  157. </div>
  158. <div class="overflow-x-auto max-h-[20vh]">
  159. <table id="historyTable" class="w-full">
  160. <thead class="bg-gray-50 border-b border-gray-200">
  161. <tr>
  162. <th class="px-6 py-3 text-left text-sm font-bold text-[#101419]">Cantidad</th>
  163. <th class="px-6 py-3 text-left text-sm font-bold text-[#101419]">Producto</th>
  164. <th class="px-6 py-3 text-right text-sm font-bold text-[#101419]">Precio</th>
  165. </tr>
  166. </thead>
  167. <tbody class="divide-y divide-gray-200">
  168. <template id="historyRowTemplate">
  169. <tr class="hover:bg-gray-50 transition-colors">
  170. <td class="list-element-quantity px-6 py-4 text-sm text-[#58728d]">1</td>
  171. <td class="px-6 py-4">
  172. <div class="flex flex-col">
  173. <span class="list-element-name text-sm font-medium text-[#101419]">Klein Lager</span>
  174. </div>
  175. </td>
  176. <td class="list-element-price px-6 py-4 text-sm font-semibold text-[#101419] text-right">$6.000</td>
  177. </tr>
  178. </template>
  179. </tbody>
  180. <!-- Total -->
  181. <tfoot class="bg-gray-50 border-t border-gray-200">
  182. <tr>
  183. <td colspan="2" class="px-6 py-4 text-base font-bold text-[#101419] text-right">
  184. Total General:
  185. </td>
  186. <td id="cartHistoryTotal" class="px-6 py-4 text-lg font-bold text-[#101419] text-right">
  187. $0
  188. </td>
  189. </tr>
  190. </tfoot>
  191. </table>
  192. </div>
  193. </div>
  194. </section>
  195. </main>
  196. <!-- ---------- NAVBAR ---------- -->
  197. <footer class="inset-x-0 z-10 border-t border-gray-200 bg-gray-50 px-4 py-2">
  198. <nav class="flex gap-2">
  199. <button data-target="menuTab" data-title="Biergarten Klein" class="active tab-btn flex-1 flex flex-col items-center text-[#58728d]">
  200. <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="h-8"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M5 12l-2 0l9 -9l9 9l-2 0" /><path d="M5 12v7a2 2 0 0 0 2 2h10a2 2 0 0 0 2 -2v-7" /><path d="M9 21v-6a2 2 0 0 1 2 -2h2a2 2 0 0 1 2 2v6" /></svg><span class="text-xs font-medium">Inicio</span>
  201. </button>
  202. <button data-target="cartTab" data-title="Carrito Klein" class="tab-btn flex-1 flex flex-col items-center text-[#58728d]">
  203. <div id="cartIcon">
  204. <span id="cartCount">0</span>
  205. <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="currentColor"
  206. viewBox="0 0 256 256" class="h-8">
  207. <path
  208. d="M222.14,58.87A8,8,0,0,0,216,56H54.68L49.79,29.14A16,16,0,0,0,34.05,16H16a8,8,0,0,0,0,16h18L59.56,172.29a24,24,0,0,0,5.33,11.27,28,28,0,1,0,44.4,8.44h45.42A27.75,27.75,0,0,0,152,204a28,28,0,1,0,28-28H83.17a8,8,0,0,1-7.87-6.57L72.13,152h116a24,24,0,0,0,23.61-19.71l12.16-66.86A8,8,0,0,0,222.14,58.87ZM96,204a12,12,0,1,1-12-12A12,12,0,0,1,96,204Zm96,0a12,12,0,1,1-12-12A12,12,0,0,1,192,204Zm4-74.57A8,8,0,0,1,188.1,136H69.22L57.59,72H206.41Z" />
  209. </svg>
  210. </div>
  211. <span class="text-xs font-medium">Carrito</span>
  212. </button>
  213. <button data-target="chatTab" data-title="RetroChat" class="tab-btn flex-1 flex flex-col items-center text-[#58728d]">
  214. <div id="chatIcon">
  215. <span class="hidden"></span>
  216. <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="h-8"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M8 9h8" /><path d="M8 13h6" /><path d="M18 4a3 3 0 0 1 3 3v8a3 3 0 0 1 -3 3h-5l-5 3v-3h-2a3 3 0 0 1 -3 -3v-8a3 3 0 0 1 3 -3h12z" /></svg>
  217. </div><span class="text-xs font-medium">Chat IA</span>
  218. </button>
  219. </nav>
  220. </footer>
  221. <!-- ---------- TOAST ---------- -->
  222. <div id="toastCart"
  223. class="fixed top-4 left-1/2 -translate-x-1/2 bg-[#101419] text-white text-sm
  224. rounded-md px-4 py-2 shadow-lg opacity-0 pointer-events-none z-50
  225. origin-left">
  226. </div>
  227. <!-- MODALS -->
  228. <!-- === MODAL INICIO DE SESIÓN === -->
  229. <div id="sessionModal"
  230. class="hidden fixed inset-0 bg-black/70 flex items-center justify-center z-40 p-4">
  231. <form id="loginForm" class="bg-white w-full max-w-md p-8 rounded-xl shadow-xl space-y-6">
  232. <div class="text-center">
  233. <h2 id="loginTitle" class="text-2xl font-bold text-gray-900">¡Bienvenido!</h2>
  234. <p id="loginMessage" class="text-sm text-gray-600 mt-2">
  235. Ingresa tus datos para comenzar tu pedido
  236. </p>
  237. </div>
  238. <div class="space-y-4">
  239. <div id="emailInputContainer">
  240. <label for="emailInput" class="block text-sm font-medium text-gray-700 mb-2">
  241. Correo electrónico
  242. </label>
  243. <input id="emailInput"
  244. name="email"
  245. type="email"
  246. class="w-full border border-gray-300 px-4 py-3 rounded-lg focus:ring-2 focus:ring-[#101419] focus:border-transparent outline-none transition-all"
  247. placeholder="tu@email.com"
  248. required />
  249. </div>
  250. <div id="pinInputContainer">
  251. <label for="pinInput" class="block text-sm font-medium text-gray-700 mb-2">
  252. PIN de 4 dígitos
  253. </label>
  254. <input id="pinInput"
  255. name="pin"
  256. type="password"
  257. maxlength="4"
  258. pattern="[0-9]{4}"
  259. class="w-full border border-gray-300 px-4 py-3 rounded-lg focus:ring-2 focus:ring-[#101419] focus:border-transparent outline-none transition-all"
  260. placeholder="••••"
  261. required />
  262. </div>
  263. <div id="tableInputContainer">
  264. <label for="tableInput" class="block text-sm font-medium text-gray-700 mb-2">
  265. Número de mesa
  266. </label>
  267. <input id="tableInput"
  268. name="table"
  269. type="number"
  270. min="1"
  271. class="w-full border border-gray-300 px-4 py-3 rounded-lg focus:ring-2 focus:ring-[#101419] focus:border-transparent outline-none transition-all"
  272. placeholder="Ej: 5"
  273. required />
  274. </div>
  275. </div>
  276. <span id="ErrorLogin" class="hidden text-red-500 text-sm"></span>
  277. <a id="recoveryPIN" href="/recovery" class="block w-full bg-gray-200 text-center text-black py-3 rounded-lg font-medium transition-colors duration-200 focus:ring-2 focus:ring-offset-2 focus:ring-[#101419]" >Olvide mi PIN</a>
  278. <button id="sessionAcceptBtn"
  279. type="submit"
  280. class="w-full bg-[#101419] hover:bg-[#37404a] text-white py-3 rounded-lg font-medium transition-colors duration-200 focus:ring-2 focus:ring-offset-2 focus:ring-[#101419]">
  281. Comenzar pedido
  282. </button>
  283. <button id="logoutBtn"
  284. type="button"
  285. class="w-full hidden bg-gray-100 hover:bg-gray-200 text-gray-700 py-3 rounded-lg font-medium transition-colors duration-200 focus:ring-2 focus:ring-offset-2 focus:ring-gray-300">
  286. Cerrar sesión
  287. </button>
  288. </form>
  289. </div>
  290. <!-- Modal de Términos y Condiciones del Regalo -->
  291. <div id="rewardModal" class="fixed hidden inset-0 bg-black/70 flex items-center justify-center z-50 p-4">
  292. <div class="bg-white w-full max-w-lg max-h-[90vh] rounded-xl shadow-xl overflow-hidden">
  293. <!-- Header -->
  294. <div class="bg-gradient-to-r from-amber-500 to-orange-500 px-6 py-4 text-white">
  295. <div class="flex items-center justify-between">
  296. <div class="flex items-center gap-3">
  297. <span class="text-2xl">🍺</span>
  298. <h2 class="text-xl font-bold">¡Cerveza Gratis!</h2>
  299. </div>
  300. <button id="closeRewardModal" class="text-white/80 hover:text-white text-2xl font-bold transition-colors">
  301. ×
  302. </button>
  303. </div>
  304. </div>
  305. <!-- Content -->
  306. <div class="overflow-y-auto max-h-[60vh] px-6 py-4">
  307. <div class="space-y-4">
  308. <!-- Descripción del premio -->
  309. <div class="bg-amber-50 border border-amber-200 rounded-lg p-4">
  310. <h3 class="font-semibold text-amber-800 mb-2">🎉 ¡Felicitaciones!</h3>
  311. <p class="text-amber-700 text-sm">
  312. Has alcanzado el 100% de progreso y puedes reclamar una cerveza gratis de tu elección.
  313. </p>
  314. </div>
  315. <!-- Términos y Condiciones -->
  316. <div class="space-y-3">
  317. <h4 class="font-bold text-gray-800 text-base">Términos y Condiciones:</h4>
  318. <div class="text-sm text-gray-600 space-y-2">
  319. <div class="flex items-start gap-2">
  320. <span class="text-amber-500 font-bold">•</span>
  321. <p>Válido únicamente en Biergarten Klein para consumo en el local.</p>
  322. </div>
  323. <div class="flex items-start gap-2">
  324. <span class="text-amber-500 font-bold">•</span>
  325. <p>La cerveza gratis debe ser reclamada el mismo día que se alcanza el 100%.</p>
  326. </div>
  327. <div class="flex items-start gap-2">
  328. <span class="text-amber-500 font-bold">•</span>
  329. <p>Aplica para cervezas de barril regulares (no incluye cervezas premium o importadas).</p>
  330. </div>
  331. <div class="flex items-start gap-2">
  332. <span class="text-amber-500 font-bold">•</span>
  333. <p>No acumulable con otras promociones o descuentos.</p>
  334. </div>
  335. <div class="flex items-start gap-2">
  336. <span class="text-amber-500 font-bold">•</span>
  337. <p>El premio no tiene valor en efectivo y no es transferible.</p>
  338. </div>
  339. <div class="flex items-start gap-2">
  340. <span class="text-amber-500 font-bold">•</span>
  341. <p>Biergarten Klein se reserva el derecho de modificar o cancelar esta promoción sin previo aviso.</p>
  342. </div>
  343. <div class="flex items-start gap-2">
  344. <span class="text-amber-500 font-bold">•</span>
  345. <p>Debes ser mayor de 18 años para reclamar bebidas alcohólicas.</p>
  346. </div>
  347. </div>
  348. </div>
  349. <!-- Instrucciones -->
  350. <div class="bg-blue-50 border border-blue-200 rounded-lg p-4">
  351. <h4 class="font-semibold text-blue-800 mb-2">📋 Instrucciones:</h4>
  352. <p class="text-blue-700 text-sm">
  353. Una vez aceptes los términos, se generará un código que deberás mostrar al mesero junto con tu identificación para reclamar tu cerveza gratis.
  354. </p>
  355. </div>
  356. </div>
  357. </div>
  358. <!-- Footer con checkbox y botones -->
  359. <div class="border-t border-gray-200 px-6 py-4 space-y-4">
  360. <!-- Checkbox de aceptación -->
  361. <label class="flex items-start gap-3 cursor-pointer">
  362. <input id="acceptTermsCheckbox" type="checkbox" class="mt-1 w-4 h-4 text-amber-600 bg-gray-100 border-gray-300 rounded focus:ring-amber-500 focus:ring-2">
  363. <span class="text-sm text-gray-700">
  364. He leído y acepto los términos y condiciones para reclamar mi cerveza gratis.
  365. </span>
  366. </label>
  367. <!-- Botones -->
  368. <div class="flex gap-3">
  369. <button id="cancelRewardBtn" class="flex-1 bg-gray-100 hover:bg-gray-200 text-gray-700 py-3 rounded-lg font-medium transition-colors duration-200">
  370. Cancelar
  371. </button>
  372. <button id="claimRewardBtn" class="flex-1 bg-amber-500 hover:bg-amber-600 text-white py-3 rounded-lg font-medium transition-colors duration-200 opacity-50 cursor-not-allowed" disabled>
  373. 🎉 Reclamar Premio
  374. </button>
  375. </div>
  376. </div>
  377. </div>
  378. </div>
  379. <div id="successRewardModal" class="fixed hidden inset-0 bg-black/60 flex items-center justify-center z-50 p-4">
  380. <div class="bg-white w-full max-w-md rounded-xl shadow-xl overflow-hidden">
  381. <!-- Header -->
  382. <div class="bg-[#101419] px-6 py-8 text-white text-center relative">
  383. <!-- Elementos decorativos sutiles -->
  384. <div class="absolute top-3 left-4 text-amber-300 text-lg">✨</div>
  385. <div class="absolute top-4 right-6 text-amber-300 text-sm">🎉</div>
  386. <div class="absolute bottom-3 right-4 text-amber-300 text-sm">💫</div>
  387. <!-- Icono principal -->
  388. <div class="text-6xl mb-3">🍺</div>
  389. <!-- Título -->
  390. <h2 class="text-2xl font-bold mb-2">¡FELICIDADES!</h2>
  391. <div class="bg-white/20 rounded-full px-3 py-1 inline-block">
  392. <p class="text-gray-100 text-sm font-medium">🎁 Premio Reclamado</p>
  393. </div>
  394. </div>
  395. <!-- Content -->
  396. <div class="px-6 py-6 space-y-4">
  397. <!-- Mensaje de bienvenida -->
  398. <div class="text-center">
  399. <div class="bg-gray-50 rounded-lg p-4 border border-gray-200">
  400. <h3 class="text-lg font-bold text-[#101419] mb-1">🍻 ¡Tu cerveza gratis te espera!</h3>
  401. <p class="text-[#58728d] text-sm">Sigue estos pasos para reclamar tu premio</p>
  402. </div>
  403. </div>
  404. <!-- Instrucciones -->
  405. <div class="space-y-3">
  406. <div class="flex items-start gap-3 p-3 bg-gray-50 rounded-lg border border-gray-200">
  407. <div class="bg-[#101419] text-white rounded-full w-7 h-7 flex items-center justify-center text-sm font-bold flex-shrink-0">1</div>
  408. <div class="text-sm">
  409. <div class="font-bold text-[#101419] mb-1">👨‍💼 Espera al mesero</div>
  410. <div class="text-[#58728d]">Este se acercará con tu comprobante de premio</div>
  411. </div>
  412. </div>
  413. <div class="flex items-start gap-3 p-3 bg-gray-50 rounded-lg border border-gray-200">
  414. <div class="bg-[#101419] text-white rounded-full w-7 h-7 flex items-center justify-center text-sm font-bold flex-shrink-0">2</div>
  415. <div class="text-sm">
  416. <div class="font-bold text-[#101419] mb-1">🍺 Elige tu cerveza favorita</div>
  417. <div class="text-[#58728d]">Selecciona cualquier cerveza hasta <span class="font-semibold">$5,000</span></div>
  418. </div>
  419. </div>
  420. <div class="flex items-start gap-3 p-3 bg-gray-50 rounded-lg border border-gray-200">
  421. <div class="bg-[#101419] text-white rounded-full w-7 h-7 flex items-center justify-center text-sm font-bold flex-shrink-0">3</div>
  422. <div class="text-sm">
  423. <div class="font-bold text-[#101419] mb-1">🎉 ¡Disfruta al máximo!</div>
  424. <div class="text-[#58728d]">Tu cerveza gratis está lista para disfrutar 🥳</div>
  425. </div>
  426. </div>
  427. </div>
  428. <!-- Nota importante -->
  429. <div class="bg-amber-50 border border-amber-200 rounded-lg p-3">
  430. <div class="flex items-center gap-2 mb-1">
  431. <span class="text-base">⏰</span>
  432. <h4 class="font-semibold text-amber-800 text-sm">Importante</h4>
  433. </div>
  434. <p class="text-amber-700 text-sm">Este premio es válido solo para el día de hoy. ¡No pierdas esta oportunidad!</p>
  435. </div>
  436. </div>
  437. <!-- Footer -->
  438. <div class="px-6 py-4 bg-gray-50 border-t border-gray-200">
  439. <button id="closeSuccessRewardModal" class="w-full bg-[#101419] hover:bg-[#37404a] text-white py-3 rounded-lg font-medium transition-colors duration-200">
  440. <span class="flex items-center justify-center gap-2">
  441. <span>🎊</span>
  442. Aceptar
  443. <span>🍻</span>
  444. </span>
  445. </button>
  446. </div>
  447. </div>
  448. </div>
  449. <div id="commentModal" class="hidden fixed inset-0 bg-black/70 flex items-center justify-center z-50 p-4">
  450. <div class="bg-white w-full max-w-md rounded-xl shadow-xl overflow-hidden">
  451. <div class="hidden bg-gray-50 px-6 py-4 border-b border-gray-200">
  452. <div class="flex items-center justify-between">
  453. <h2 id="titleComment" class="text-xl font-bold text-[#101419]">Titulo</h2>
  454. <button id="closeCommentModal" type="button" class="text-gray-400 hover:text-gray-600 text-2xl font-bold transition-colors">
  455. &times;
  456. </button>
  457. </div>
  458. </div>
  459. <!-- 2 posibles modals: un campo con textarea y boton de enviar o un campo desplegable con opciones -->
  460. <form id="selectCommentTypeForm" class="hidden">
  461. <div class="p-6 space-y-4">
  462. <p class="text-sm text-[#58728d]">
  463. Elige un sabor
  464. </p>
  465. <div id="selectOptions" class="flex flex-col gap-2">
  466. </div>
  467. </div>
  468. </form>
  469. <form id="commentForm" class="hidden">
  470. <div class="p-6 space-y-4">
  471. <p class="text-sm text-[#58728d]">
  472. ¿Alguna instrucción para la cocina? (Ej: sin cebolla, muy picante, alergias, etc.)
  473. </p>
  474. <div>
  475. <label for="commentTextarea" class="hidden text-sm font-medium text-gray-700 mb-2">
  476. Tu comentario
  477. </label>
  478. <textarea id="commentTextarea"
  479. name="comment"
  480. rows="4"
  481. class="w-full border border-gray-300 px-4 py-3 rounded-lg focus:ring-2 focus:ring-[#101419] focus:border-transparent outline-none transition-all"
  482. placeholder="Escribe tu comentario aquí..."></textarea>
  483. </div>
  484. </div>
  485. <div class="border-t border-gray-200 bg-gray-50 px-6 py-4 flex gap-3">
  486. <button id="cancelCommentBtn" type="button" class="flex-1 bg-gray-100 hover:bg-gray-200 text-gray-700 py-3 rounded-lg font-medium transition-colors duration-200">
  487. Cancelar
  488. </button>
  489. <button id="submitCommentBtn" type="submit" class="flex-1 bg-[#101419] hover:bg-[#37404a] text-white py-3 rounded-lg font-medium transition-colors duration-200">
  490. Guardar
  491. </button>
  492. </div>
  493. </form>
  494. </div>
  495. </div>
  496. <!-- ---------- JS: conmutar tabs + toast ---------- -->
  497. <script>
  498. // toast simple
  499. window.showToast = (msg) => {
  500. const toast = document.getElementById('toastCart');
  501. toast.textContent = msg;
  502. toast.style.animation = 'none'; // reset
  503. void toast.offsetWidth; // reflow
  504. toast.style.opacity = '1';
  505. toast.style.animation = 'popup 1s ease-out';
  506. toast.addEventListener('animationend', () => {
  507. toast.style.animation = 'none';
  508. toast.style.opacity = '0';
  509. });
  510. };
  511. </script>
  512. </body>
  513. </html>