index.html 28 KB

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