var/cache/dev/twig/a9/a9d1fe9dd2184efb47c66dbaac9dee96.php line 324

Open in your IDE?
  1. <?php
  2. use Twig\Environment;
  3. use Twig\Error\LoaderError;
  4. use Twig\Error\RuntimeError;
  5. use Twig\Extension\CoreExtension;
  6. use Twig\Extension\SandboxExtension;
  7. use Twig\Markup;
  8. use Twig\Sandbox\SecurityError;
  9. use Twig\Sandbox\SecurityNotAllowedTagError;
  10. use Twig\Sandbox\SecurityNotAllowedFilterError;
  11. use Twig\Sandbox\SecurityNotAllowedFunctionError;
  12. use Twig\Source;
  13. use Twig\Template;
  14. use Twig\TemplateWrapper;
  15. /* base.html.twig */
  16. class __TwigTemplate_f4e641c9176a92404c953c7437a87797 extends Template
  17. {
  18.     private Source $source;
  19.     /**
  20.      * @var array<string, Template>
  21.      */
  22.     private array $macros = [];
  23.     public function __construct(Environment $env)
  24.     {
  25.         parent::__construct($env);
  26.         $this->source $this->getSourceContext();
  27.         $this->parent false;
  28.         $this->blocks = [
  29.             'title' => [$this'block_title'],
  30.             'stylesheets' => [$this'block_stylesheets'],
  31.             'javascripts' => [$this'block_javascripts'],
  32.             'body' => [$this'block_body'],
  33.         ];
  34.     }
  35.     protected function doDisplay(array $context, array $blocks = []): iterable
  36.     {
  37.         $macros $this->macros;
  38.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  39.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""base.html.twig"));
  40.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  41.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""base.html.twig"));
  42.         // line 1
  43.         yield "<!DOCTYPE html>
  44. <html>
  45.     <head>
  46.         <meta charset=\"UTF-8\">
  47.         <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">
  48.         <title>TcgBunker - Home</title>
  49.         <!-- Metadatos Open Graph para control de la miniatura y la descripción -->
  50.         <meta property=\"og:title\" content=\"TcgBunker\">
  51.         <meta property=\"og:description\" content=\"Compra decks y mucho mas\">
  52.         <meta property=\"og:image\" content=\"/images/test.png\">
  53.         <meta property=\"og:type\" content=\"website\">
  54.         <link href=\"https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha3/dist/css/bootstrap.min.css\" rel=\"stylesheet\">
  55.         <link href=\"https://cdnjs.cloudflare.com/ajax/libs/aos/2.3.4/aos.css\" rel=\"stylesheet\"> <!-- AOS CSS -->
  56.         <link rel=\"stylesheet\" href=\"https://cdnjs.cloudflare.com/ajax/libs/bootstrap-icons/1.11.3/font/bootstrap-icons.min.css\" integrity=\"sha512-dPXYcDub/aeb08c63jRq/k6GaKccl256JQy/AnOq7CAnEZ9FzSL9wSbcZkMp4R26vBsMLFYH4kQ67/bbV8XaCQ==\" crossorigin=\"anonymous\" referrerpolicy=\"no-referrer\" />
  57.         <script src=\"https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha3/dist/js/bootstrap.bundle.min.js\"></script>
  58.         <script src=\"https://cdnjs.cloudflare.com/ajax/libs/aos/2.3.4/aos.js\"></script>
  59.         <script src=\"https://code.jquery.com/jquery-3.7.1.min.js\" integrity=\"sha256-/JqT3SQfawRcv/BIHPThkBvs0OEvtFFmqPF/lYI/Cxo=\" crossorigin=\"anonymous\"></script>
  60.         <!-- Google Font -->
  61.         <link href=\"https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600&display=swap\" rel=\"stylesheet\">
  62.         <style>
  63.             body {
  64.                 font-family: 'Poppins', sans-serif;
  65.                 background-color: #f8f9fa;
  66.                 color: #333;
  67.                 overflow-y: scroll;
  68.             }
  69.             .btn-primary {
  70.                 background-color: #E63946;
  71.                 border: none;
  72.             }
  73.             .btn-outline-primary{
  74.                     --bs-btn-color: #E63946;
  75.                     --bs-btn-border-color: #E63946;
  76.                     --bs-btn-hover-color: #fff;
  77.                     --bs-btn-hover-bg: #E63946;
  78.                     --bs-btn-hover-border-color: #E63946;
  79.                     --bs-btn-focus-shadow-rgb: 13, 110, 253;
  80.                     --bs-btn-active-color: #fff;
  81.                     --bs-btn-active-bg: #E63946;
  82.                     --bs-btn-active-border-color: #E63946;
  83.                     --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
  84.                     --bs-btn-disabled-color: #E63946;
  85.                     --bs-btn-disabled-bg: transparent;
  86.                     --bs-btn-disabled-border-color: #E63946;
  87.                     --bs-gradient: none;
  88.             }
  89.             .btn-primary:hover {
  90.                 background-color: #D62839;
  91.             }
  92.             .btn-secondary {
  93.                 background-color: #F4A261;
  94.                 border: none;
  95.                 color: #FFFFFF;
  96.             }
  97.             .btn-secondary:hover {
  98.                 background-color: #E08E3C;
  99.             }
  100.             .pointer{
  101.                 cursor:pointer;
  102.             }
  103.             .form-section {
  104.                 background-color: #F2F2F2;
  105.                 padding: 50px 20px;
  106.             }
  107.             .contact-section {
  108.                 background-color: #F2F2F2;
  109.                 padding: 50px 20px;
  110.             }
  111.             .carousel-item img {
  112.                 height: 300px;
  113.                 object-fit: cover;
  114.             }
  115.             footer {
  116.                 background-color: #333333;
  117.                 color: white;
  118.                 padding: 20px 0;
  119.                 text-align: center;
  120.             }
  121.             .cart-icon {
  122.                 font-size: 1.5rem;
  123.                 color: #F2F2F2;
  124.             }
  125.             
  126.             .bg-deg{
  127.                 background: linear-gradient(rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.5))
  128.             }
  129.             
  130.         </style>
  131.         <style>
  132.             .product-row img {
  133.                 height: 200px;
  134.                 object-fit: cover;
  135.                 width: 100%;
  136.             }
  137.             .category-section {
  138.                 padding: 20px 0;
  139.                 border-bottom: 1px solid #eaeaea;
  140.             }
  141.             h1.category-section {
  142.                 padding: 20px 0;
  143.                 border-bottom: 2px solid #333;
  144.             }
  145.             .category-section h3 {
  146.                 border-bottom: 2px solid #333;
  147.                 padding-bottom: 5px;
  148.             }
  149.         </style>
  150.         <style>
  151.             /* Estilo del carrito dinámico */
  152.             .cart-sidebar {
  153.                 position: fixed;
  154.                 top: 0;
  155.                 right: -320px;
  156.                 width: 320px;
  157.                 height: 100%;
  158.                 background: white;
  159.                 box-shadow: -2px 0 5px rgba(0, 0, 0, 0.1);
  160.                 padding: 20px;
  161.                 overflow-y: auto;
  162.                 transition: right 0.3s ease;
  163.                 z-index: 1050;
  164.             }
  165.             .cart-sidebar.open {
  166.                 right: 0;
  167.             }
  168.             .cart-header {
  169.                 background-color: #f8f9fa;
  170.                 font-weight: bold;
  171.             }
  172.             .cart-items {
  173.                 flex: 1;
  174.                 overflow-y: auto;
  175.             }
  176.             .cart-footer {
  177.                 background-color: #f8f9fa;
  178.             }
  179.             .list-group-item .btn {
  180.                 padding: 0 8px;
  181.                 font-size: 12px;
  182.                 line-height: 1.5;
  183.                 margin-left: 5px;
  184.                 margin-right: 5px;
  185.             }
  186.         </style>
  187.         <!-- Estilos adicionales -->
  188.         <style>
  189.             nav ul li a {
  190.                 color: #fff;
  191.             }
  192.             nav ul li a:hover {
  193.                 color: #dc3545; /* Efecto hover para los enlaces del menú */
  194.             }
  195.             .section-title 
  196.             {
  197.                 font-weight: 600;
  198.                 color: #e50914!important;
  199.             }
  200.             a.section-title 
  201.             {
  202.                 font-weight: 600;
  203.                 color: #e50914!important;
  204.             }
  205.             .m-h-75{
  206.                 min-height: 75vh;
  207.             }
  208.             .m-h-60{
  209.                 min-height: 60vh;
  210.             }
  211.             .fs-7{
  212.                 font-size: 14px!important;
  213.             }
  214.             /* CSS: transición suave y origen del zoom centrado */
  215.             .zoom {
  216.                 transition: transform 0.3s ease;
  217.                 transform-origin: center center;
  218.             }
  219.             .out-of-stock {
  220.                 position: relative;
  221.                 opacity: 0.5; /* Da un efecto sombreado o deshabilitado */
  222.             }
  223.             .out-of-stock::after {
  224.                 content: \"AGOTADO\";
  225.                 position: absolute;
  226.                 top: 40%;
  227.                 left: 50%;
  228.                 transform: translate(-50%, -50%);
  229.                 background: rgba(255, 0, 0, 0.7);
  230.                 color: white;
  231.                 padding: 5px 15px;
  232.                 font-weight: bold;
  233.                 border-radius: 5px;
  234.             }
  235. </style>
  236.             
  237.         </style>
  238.         <meta charset=\"UTF-8\">
  239.         <title>";
  240.         // line 222
  241.         yield from $this->unwrap()->yieldBlock('title'$context$blocks);
  242.         yield "</title>
  243.         <link rel=\"icon\" href=\"data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 128 128%22><text y=%221.2em%22 font-size=%2296%22>⚫️</text></svg>\">
  244.         ";
  245.         // line 225
  246.         yield "        ";
  247.         yield from $this->unwrap()->yieldBlock('stylesheets'$context$blocks);
  248.         // line 228
  249.         yield "
  250.         ";
  251.         // line 229
  252.         yield from $this->unwrap()->yieldBlock('javascripts'$context$blocks);
  253.         // line 232
  254.         yield "    </head>
  255.     <body>
  256.         
  257.         ";
  258.         // line 235
  259.         $context['_parent'] = $context;
  260.         $context['_seq'] = CoreExtension::ensureTraversable(CoreExtension::getAttribute($this->env$this->source, (isset($context["app"]) || array_key_exists("app"$context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.'235$this->source); })()), "flashes", [], "any"falsefalsefalse235));
  261.         foreach ($context['_seq'] as $context["label"] => $context["messages"]) {
  262.             // line 236
  263.             yield "            ";
  264.             $context['_parent'] = $context;
  265.             $context['_seq'] = CoreExtension::ensureTraversable($context["messages"]);
  266.             foreach ($context['_seq'] as $context["_key"] => $context["message"]) {
  267.                 // line 237
  268.                 yield "                <div class=\"alert alert-";
  269.                 yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($context["label"], "html"nulltrue);
  270.                 yield " alert-dismissible fade show\"  role=\"alert\">
  271.                     ";
  272.                 // line 238
  273.                 yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($context["message"], "html"nulltrue);
  274.                 yield "
  275.                       <button type=\"button\" class=\"btn-close\" data-bs-dismiss=\"alert\" aria-label=\"Close\"></button>
  276.                 </div>
  277.             ";
  278.             }
  279.             $_parent $context['_parent'];
  280.             unset($context['_seq'], $context['_key'], $context['message'], $context['_parent']);
  281.             $context array_intersect_key($context$_parent) + $_parent;
  282.             // line 242
  283.             yield "        ";
  284.         }
  285.         $_parent $context['_parent'];
  286.         unset($context['_seq'], $context['label'], $context['messages'], $context['_parent']);
  287.         $context array_intersect_key($context$_parent) + $_parent;
  288.         // line 243
  289.         yield "        ";
  290.         yield from $this->unwrap()->yieldBlock('body'$context$blocks);
  291.         // line 244
  292.         yield "        
  293.         <!-- Sidebar del carrito -->
  294.         <div id=\"cart-sidebar\" class=\"cart-sidebar\">
  295.             <!-- El contenido del carrito será cargado dinámicamente aquí -->
  296.         </div>
  297.         <!-- Footer -->
  298.         <footer class=\"bg-dark text-white pt-5\">
  299.             <div class=\"container\">
  300.                 <div class=\"row fs-7\">
  301.                     <!-- Políticas -->
  302.                     <div class=\"col-12 col-md-12 mb-4\">
  303.                         <h5 class=\"text-uppercase mb-4 d-none\">Políticas</h5>
  304.                         <ul class=\"list-unstyled d-md-flex d-block justify-content-start gap-3\">
  305.                             <li class=\"mb-2\"><a href=\"/politica-de-privacidad\" class=\"text-white text-decoration-none\">Política de Privacidad</a></li>
  306.                             <li class=\"mb-2\"><a href=\"/terminos-del-servicio\" class=\"text-white text-decoration-none\">Términos y Condiciones</a></li>
  307.                             <li class=\"mb-2\"><a href=\"/politica-de-cookies\" class=\"text-white text-decoration-none\">Política de Cookies</a></li>
  308.                             <li class=\"mb-2\"><a href=\"/politica-de-devoluciones\" class=\"text-white text-decoration-none\">Devoluciones</a></li>
  309.                             <li class=\"mb-2\"><a href=\"/contact\" class=\"text-white text-decoration-none\">Contáctanos</a></li>
  310.                         </ul>
  311.                     </div>
  312.                     <!-- Métodos de Pago -->
  313.                     <div class=\"col-12 col-md-4 mb-4 d-none\">
  314.                         <h5 class=\"text-uppercase mb-4\">Métodos de Pago</h5>
  315.                         <ul class=\"list-inline\">
  316.                             <li class=\"list-inline-item mb-2\">
  317.                                 <i class=\"bi bi-credit-card fs-4\" aria-label=\"Tarjetas de crédito\"></i>
  318.                                 <div class=\"small\">Tarjetas</div>
  319.                             </li>
  320.                             <!--<li class=\"list-inline-item mb-2\">
  321.                                 <i class=\"bi bi-paypal fs-4\" aria-label=\"PayPal\"></i>
  322.                                 <div class=\"small\">PayPal</div>
  323.                             </li>
  324.                             <li class=\"list-inline-item mb-2\">
  325.                                 <i class=\"bi bi-cash fs-4\" aria-label=\"Efectivo\"></i>
  326.                                 <div class=\"small\">Contraentrega</div>
  327.                             </li>-->
  328.                         </ul>
  329.                     </div>
  330.                     <!-- Métodos de Envío -->
  331.                     <div class=\"col-12 col-md-4 mb-4 d-none\">
  332.                         <h5 class=\"text-uppercase mb-4\">Envíos</h5>
  333.                         <ul class=\"list-inline\">
  334.                             <li class=\"list-inline-item mb-2\">
  335.                                 <i class=\"bi bi-truck fs-4\" aria-label=\"Envío estándar\"></i>
  336.                                 <div class=\"small\">Estándar</div>
  337.                             </li>
  338.                             <!--<li class=\"list-inline-item mb-2\">
  339.                                 <i class=\"bi bi-box-seam fs-4\" aria-label=\"Envío express\"></i>
  340.                                 <div class=\"small\">Express</div>
  341.                             </li>
  342.                             <li class=\"list-inline-item mb-2\">
  343.                                 <i class=\"bi bi-globe fs-4\" aria-label=\"Envío internacional\"></i>
  344.                                 <div class=\"small\">Internacional</div>
  345.                             </li>-->
  346.                         </ul>
  347.                     </div>
  348.                     
  349.                     <!-- Redes Sociales (extra) -->
  350.                     <!--<div class=\"col-12 col-md-3 mb-4\">
  351.                         <h5 class=\"text-uppercase mb-4\">Síguenos</h5>
  352.                         <div class=\"d-flex gap-3 justify-content-center\">
  353.                             <a href=\"#\" class=\"text-white\"><i class=\"bi bi-facebook fs-4\"></i></a>
  354.                             <a href=\"#\" class=\"text-white\"><i class=\"bi bi-instagram fs-4\"></i></a>
  355.                             <a href=\"#\" class=\"text-white\"><i class=\"bi bi-twitter-x fs-4\"></i></a>
  356.                             <a href=\"#\" class=\"text-white\"><i class=\"bi bi-tiktok fs-4\"></i></a>
  357.                         </div>
  358.                     </div>-->
  359.                 </div>
  360.                 <!-- Derechos de autor -->
  361.                 <div class=\"border-top pt-4\">
  362.                     <div class=\"row\">
  363.                         <div class=\"col-12 text-center\">
  364.                             <p class=\"small mb-0\">&copy; 2025 TcgBunker. Todos los derechos reservados.</p>
  365.                         </div>
  366.                     </div>
  367.                 </div>
  368.             </div>
  369.         </footer>
  370.         <!-- Barra de cookies -->
  371.         <div id=\"cookie-banner\" style=\"position: fixed; bottom: 0; left: 0; right: 0; background: #222; color: white; padding: 1em; display: none; z-index: 1000;\">
  372.             <div style=\"max-width: 800px; margin: auto; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap;\">
  373.                 <span>Este sitio usa cookies para mejorar tu experiencia. <a href=\"/politica-de-cookies\" style=\"color: #e50914;\">Leer más</a></span>
  374.                 <div>
  375.                 <button id=\"accept-cookies\" style=\"border: none; padding: 0.5em 1em; margin-left: 0.5em;\" class=\"btn btn-primary\">Aceptar</button>
  376.                 <button id=\"reject-cookies\" style=\"background: #555; color: #fff; border: none; padding: 0.5em 1em; margin-left: 0.5em;\" class=\"btn\">Rechazar</button>
  377.                 </div>
  378.             </div>
  379.         </div>
  380.         <script>
  381.             function cargarGA() {
  382.                 var gaScript = document.createElement('script');
  383.                 gaScript.src = 'https://www.googletagmanager.com/gtag/js?id=G-JL6JLQZRZR';
  384.                 gaScript.async = true;
  385.                 document.head.appendChild(gaScript);
  386.                 gaScript.onload = function () {
  387.                 window.dataLayer = window.dataLayer || [];
  388.                 function gtag(){ dataLayer.push(arguments); }
  389.                 window.gtag = gtag;
  390.                 gtag('js', new Date());
  391.                 gtag('config', 'G-JL6JLQZRZR');
  392.                 }
  393.             }
  394.             const banner = document.getElementById(\"cookie-banner\");
  395.             if (localStorage.getItem(\"cookies-consent\") === \"accepted\") {
  396.                 cargarGA();
  397.             } else if (localStorage.getItem(\"cookies-consent\") !== \"rejected\") {
  398.                 banner.style.display = \"block\";
  399.             }
  400.             document.getElementById(\"accept-cookies\").onclick = function () {
  401.                 localStorage.setItem(\"cookies-consent\", \"accepted\");
  402.                 banner.style.display = \"none\";
  403.                 cargarGA();
  404.             };
  405.             document.getElementById(\"reject-cookies\").onclick = function () {
  406.                 localStorage.setItem(\"cookies-consent\", \"rejected\");
  407.                 banner.style.display = \"none\";
  408.                 // No se carga GA
  409.             };
  410.         </script>
  411.         
  412.         <script>
  413.             AOS.init(); // Inicializar animaciones
  414.         </script>
  415.         <script>
  416.             document.addEventListener('DOMContentLoaded', function () {
  417.                 const headerHeight = document.querySelector('.header').offsetHeight;
  418.                 document.querySelectorAll('a[href^=\"#\"]').forEach(anchor => {
  419.                     anchor.addEventListener('click', function (e) {
  420.                         e.preventDefault();
  421.                         const target = document.querySelector(this.getAttribute('href'));
  422.                         const offsetTop = target.offsetTop - headerHeight;
  423.                         window.scrollTo({
  424.                             top: offsetTop,
  425.                             behavior: 'smooth'
  426.                         });
  427.                     });
  428.                 });
  429.             });
  430.         </script>
  431.         <script>
  432.             
  433.             \$(document).ready(function () {
  434.                 const confirmationMessage = document.getElementById('confirmation-message');
  435.                 // Manejar el clic en \"Añadir al carrito\"
  436.                 \$('body').on('click','.addToCart', function () {
  437.                     const \$parent = \$(this).closest('.product-row');
  438.                     const productId = \$(this).data('product-id');
  439.                     const quantity = \$parent.find('input[type=\"number\"]').val();
  440.                     const open = \$(this).data('open') ?? false;
  441.                     const goCheckout = \$(this).data('checkout') ?? false;
  442.                     const extras = \$('#extraIngredients').val() || [];
  443.                     const removals = \$('#removableIngredients').val() || [];
  444.                     // Enviar solicitud AJAX
  445.                     \$.ajax({
  446.                         url: '/cart/add',
  447.                         method: 'POST',
  448.                         contentType: 'application/json',
  449.                         data: JSON.stringify({
  450.                             productId: productId,
  451.                             quantity: parseInt(quantity),
  452.                             extras: extras,
  453.                             removals: removals
  454.                         }),
  455.                         success: function (data) {
  456.                             if (data.success) {
  457.                                 \$('.cartIconView').html(data.htmlCart);
  458.                                 
  459.                                 if(goCheckout){
  460.                                     window.location.href = \"/checkout\";
  461.                                 }
  462.                                 if(open){
  463.                                     \$('.cart-icon').trigger('click');
  464.                                 }
  465.                                 if(confirmationMessage && confirmationMessage.classList){
  466.                                     confirmationMessage.classList.remove('d-none');
  467.                                     // Ocultar el mensaje después de 3 segundos
  468.                                     setTimeout(() => {
  469.                                         confirmationMessage.classList.add('d-none');
  470.                                     }, 3000);
  471.                                 }
  472.                                 
  473.                             } else {
  474.                                 alert('Hubo un problema al añadir el producto al carrito');
  475.                             }
  476.                         },
  477.                         error: function () {
  478.                             alert('Error de red al añadir el producto al carrito');
  479.                         }
  480.                     });
  481.                 });
  482.                 // Manejar el clic en los botones \"+\" y \"-\"
  483.                 \$('#cart-sidebar').on('click', '.increment-btn, .decrement-btn', function () {
  484.                     const productId = \$(this).data('product-id');
  485.                     const action = \$(this).hasClass('increment-btn') ? 'increment' : 'decrement';
  486.                     // Realizar solicitud AJAX al backend
  487.                     \$.ajax({
  488.                         url: '/cart/update',
  489.                         method: 'POST',
  490.                         data: JSON.stringify({
  491.                             productId: productId,
  492.                             action: action
  493.                         }),
  494.                         success: function (data) {
  495.                             if (data.success) {
  496.                                 const cartPanel = \$('#cart-sidebar');
  497.                                 cartPanel.html(data.htmlSlider); // Actualizar el HTML del carrito
  498.                                 const cartIcon = \$('.cartIconView');
  499.                                 cartIcon.html(data.htmlCart);
  500.                             } else {
  501.                                 alert('Hubo un problema al actualizar el carrito');
  502.                             }
  503.                         },
  504.                         error: function () {
  505.                             alert('Error de red al actualizar el carrito');
  506.                         }
  507.                     });
  508.                 });
  509.                 // Manejar el clic en el ícono del carrito
  510.                 \$('body').on('click' ,'.cart-icon', function () {
  511.                     \$.ajax({
  512.                         url: '/cart',
  513.                         method: 'GET',
  514.                         success: function (data) {
  515.                             if (data.success) {
  516.                                 const cartPanel = \$('#cart-sidebar');
  517.                                 cartPanel.html(data.htmlSlider); // Insertar el HTML recibido
  518.                                 cartPanel.addClass('open'); // Mostrar el panel lateral
  519.                                 const cartIcon = \$('.cartIconView');
  520.                                 cartIcon.html(data.htmlCart);
  521.                             } else {
  522.                                 alert('Hubo un problema al cargar el carrito');
  523.                             }
  524.                         },
  525.                         error: function () {
  526.                             alert('Error de red al cargar el carrito');
  527.                         }
  528.                     });
  529.                 });
  530.                 // Cerrar el carrito cuando se haga clic fuera del panel
  531.                 \$(document).on('click', function (e) {
  532.                     if (!\$(e.target).closest('#cart-sidebar, .cart-icon').length) {
  533.                         \$('#cart-sidebar').removeClass('open');
  534.                     }
  535.                 });
  536.                 // Cerrar el carrito cuando se haga clic en la x
  537.                 \$(document).on('click', '.close-cart', function (e) {
  538.                     console.log('here');
  539.                     
  540.                         \$('#cart-sidebar').removeClass('open');
  541.                 });
  542.                 // Manejar el clic en el botón de Checkout
  543.                 \$(document).on('click', '#checkout-btn', function () {
  544.                     window.location.href = '/checkout';
  545.                 });
  546.             });
  547.         </script>
  548.         <script>
  549.             // JavaScript: ampliar/reducir al pasar/retirar el ratón
  550.             document.addEventListener('DOMContentLoaded', () => {
  551.             const zoomImages = document.querySelectorAll('img.zoom');
  552.             zoomImages.forEach(img => {
  553.                 img.addEventListener('mouseenter', () => {
  554.                 img.style.transform = 'scale(1.1)';  // Ajusta 1.1 por el nivel de zoom deseado
  555.                 });
  556.                 img.addEventListener('mouseleave', () => {
  557.                 img.style.transform = 'scale(1)';    // Vuelve al estado original
  558.                 });
  559.             });
  560.             });
  561.         </script>
  562.     </body>
  563. </html>
  564. ";
  565.         
  566.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  567.         
  568.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  569.         yield from [];
  570.     }
  571.     // line 222
  572.     /**
  573.      * @return iterable<null|scalar|\Stringable>
  574.      */
  575.     public function block_title(array $context, array $blocks = []): iterable
  576.     {
  577.         $macros $this->macros;
  578.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  579.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""title"));
  580.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  581.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""title"));
  582.         yield "Welcome!";
  583.         
  584.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  585.         
  586.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  587.         yield from [];
  588.     }
  589.     // line 225
  590.     /**
  591.      * @return iterable<null|scalar|\Stringable>
  592.      */
  593.     public function block_stylesheets(array $context, array $blocks = []): iterable
  594.     {
  595.         $macros $this->macros;
  596.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  597.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""stylesheets"));
  598.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  599.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""stylesheets"));
  600.         // line 226
  601.         yield "            ";
  602.         yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getFunction('encore_entry_link_tags')->getCallable()("app"), "html"nulltrue);
  603.         yield "
  604.         ";
  605.         
  606.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  607.         
  608.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  609.         yield from [];
  610.     }
  611.     // line 229
  612.     /**
  613.      * @return iterable<null|scalar|\Stringable>
  614.      */
  615.     public function block_javascripts(array $context, array $blocks = []): iterable
  616.     {
  617.         $macros $this->macros;
  618.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  619.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""javascripts"));
  620.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  621.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""javascripts"));
  622.         // line 230
  623.         yield "            ";
  624.         yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getFunction('encore_entry_script_tags')->getCallable()("app"), "html"nulltrue);
  625.         yield "
  626.         ";
  627.         
  628.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  629.         
  630.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  631.         yield from [];
  632.     }
  633.     // line 243
  634.     /**
  635.      * @return iterable<null|scalar|\Stringable>
  636.      */
  637.     public function block_body(array $context, array $blocks = []): iterable
  638.     {
  639.         $macros $this->macros;
  640.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  641.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""body"));
  642.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  643.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""body"));
  644.         
  645.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  646.         
  647.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  648.         yield from [];
  649.     }
  650.     /**
  651.      * @codeCoverageIgnore
  652.      */
  653.     public function getTemplateName(): string
  654.     {
  655.         return "base.html.twig";
  656.     }
  657.     /**
  658.      * @codeCoverageIgnore
  659.      */
  660.     public function isTraitable(): bool
  661.     {
  662.         return false;
  663.     }
  664.     /**
  665.      * @codeCoverageIgnore
  666.      */
  667.     public function getDebugInfo(): array
  668.     {
  669.         return array (  716 => 243,  702 => 230,  689 => 229,  675 => 226,  662 => 225,  639 => 222,  326 => 244,  323 => 243,  317 => 242,  307 => 238,  302 => 237,  297 => 236,  293 => 235,  288 => 232,  286 => 229,  283 => 228,  280 => 225,  275 => 222,  52 => 1,);
  670.     }
  671.     public function getSourceContext(): Source
  672.     {
  673.         return new Source("<!DOCTYPE html>
  674. <html>
  675.     <head>
  676.         <meta charset=\"UTF-8\">
  677.         <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">
  678.         <title>TcgBunker - Home</title>
  679.         <!-- Metadatos Open Graph para control de la miniatura y la descripción -->
  680.         <meta property=\"og:title\" content=\"TcgBunker\">
  681.         <meta property=\"og:description\" content=\"Compra decks y mucho mas\">
  682.         <meta property=\"og:image\" content=\"/images/test.png\">
  683.         <meta property=\"og:type\" content=\"website\">
  684.         <link href=\"https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha3/dist/css/bootstrap.min.css\" rel=\"stylesheet\">
  685.         <link href=\"https://cdnjs.cloudflare.com/ajax/libs/aos/2.3.4/aos.css\" rel=\"stylesheet\"> <!-- AOS CSS -->
  686.         <link rel=\"stylesheet\" href=\"https://cdnjs.cloudflare.com/ajax/libs/bootstrap-icons/1.11.3/font/bootstrap-icons.min.css\" integrity=\"sha512-dPXYcDub/aeb08c63jRq/k6GaKccl256JQy/AnOq7CAnEZ9FzSL9wSbcZkMp4R26vBsMLFYH4kQ67/bbV8XaCQ==\" crossorigin=\"anonymous\" referrerpolicy=\"no-referrer\" />
  687.         <script src=\"https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha3/dist/js/bootstrap.bundle.min.js\"></script>
  688.         <script src=\"https://cdnjs.cloudflare.com/ajax/libs/aos/2.3.4/aos.js\"></script>
  689.         <script src=\"https://code.jquery.com/jquery-3.7.1.min.js\" integrity=\"sha256-/JqT3SQfawRcv/BIHPThkBvs0OEvtFFmqPF/lYI/Cxo=\" crossorigin=\"anonymous\"></script>
  690.         <!-- Google Font -->
  691.         <link href=\"https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600&display=swap\" rel=\"stylesheet\">
  692.         <style>
  693.             body {
  694.                 font-family: 'Poppins', sans-serif;
  695.                 background-color: #f8f9fa;
  696.                 color: #333;
  697.                 overflow-y: scroll;
  698.             }
  699.             .btn-primary {
  700.                 background-color: #E63946;
  701.                 border: none;
  702.             }
  703.             .btn-outline-primary{
  704.                     --bs-btn-color: #E63946;
  705.                     --bs-btn-border-color: #E63946;
  706.                     --bs-btn-hover-color: #fff;
  707.                     --bs-btn-hover-bg: #E63946;
  708.                     --bs-btn-hover-border-color: #E63946;
  709.                     --bs-btn-focus-shadow-rgb: 13, 110, 253;
  710.                     --bs-btn-active-color: #fff;
  711.                     --bs-btn-active-bg: #E63946;
  712.                     --bs-btn-active-border-color: #E63946;
  713.                     --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
  714.                     --bs-btn-disabled-color: #E63946;
  715.                     --bs-btn-disabled-bg: transparent;
  716.                     --bs-btn-disabled-border-color: #E63946;
  717.                     --bs-gradient: none;
  718.             }
  719.             .btn-primary:hover {
  720.                 background-color: #D62839;
  721.             }
  722.             .btn-secondary {
  723.                 background-color: #F4A261;
  724.                 border: none;
  725.                 color: #FFFFFF;
  726.             }
  727.             .btn-secondary:hover {
  728.                 background-color: #E08E3C;
  729.             }
  730.             .pointer{
  731.                 cursor:pointer;
  732.             }
  733.             .form-section {
  734.                 background-color: #F2F2F2;
  735.                 padding: 50px 20px;
  736.             }
  737.             .contact-section {
  738.                 background-color: #F2F2F2;
  739.                 padding: 50px 20px;
  740.             }
  741.             .carousel-item img {
  742.                 height: 300px;
  743.                 object-fit: cover;
  744.             }
  745.             footer {
  746.                 background-color: #333333;
  747.                 color: white;
  748.                 padding: 20px 0;
  749.                 text-align: center;
  750.             }
  751.             .cart-icon {
  752.                 font-size: 1.5rem;
  753.                 color: #F2F2F2;
  754.             }
  755.             
  756.             .bg-deg{
  757.                 background: linear-gradient(rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.5))
  758.             }
  759.             
  760.         </style>
  761.         <style>
  762.             .product-row img {
  763.                 height: 200px;
  764.                 object-fit: cover;
  765.                 width: 100%;
  766.             }
  767.             .category-section {
  768.                 padding: 20px 0;
  769.                 border-bottom: 1px solid #eaeaea;
  770.             }
  771.             h1.category-section {
  772.                 padding: 20px 0;
  773.                 border-bottom: 2px solid #333;
  774.             }
  775.             .category-section h3 {
  776.                 border-bottom: 2px solid #333;
  777.                 padding-bottom: 5px;
  778.             }
  779.         </style>
  780.         <style>
  781.             /* Estilo del carrito dinámico */
  782.             .cart-sidebar {
  783.                 position: fixed;
  784.                 top: 0;
  785.                 right: -320px;
  786.                 width: 320px;
  787.                 height: 100%;
  788.                 background: white;
  789.                 box-shadow: -2px 0 5px rgba(0, 0, 0, 0.1);
  790.                 padding: 20px;
  791.                 overflow-y: auto;
  792.                 transition: right 0.3s ease;
  793.                 z-index: 1050;
  794.             }
  795.             .cart-sidebar.open {
  796.                 right: 0;
  797.             }
  798.             .cart-header {
  799.                 background-color: #f8f9fa;
  800.                 font-weight: bold;
  801.             }
  802.             .cart-items {
  803.                 flex: 1;
  804.                 overflow-y: auto;
  805.             }
  806.             .cart-footer {
  807.                 background-color: #f8f9fa;
  808.             }
  809.             .list-group-item .btn {
  810.                 padding: 0 8px;
  811.                 font-size: 12px;
  812.                 line-height: 1.5;
  813.                 margin-left: 5px;
  814.                 margin-right: 5px;
  815.             }
  816.         </style>
  817.         <!-- Estilos adicionales -->
  818.         <style>
  819.             nav ul li a {
  820.                 color: #fff;
  821.             }
  822.             nav ul li a:hover {
  823.                 color: #dc3545; /* Efecto hover para los enlaces del menú */
  824.             }
  825.             .section-title 
  826.             {
  827.                 font-weight: 600;
  828.                 color: #e50914!important;
  829.             }
  830.             a.section-title 
  831.             {
  832.                 font-weight: 600;
  833.                 color: #e50914!important;
  834.             }
  835.             .m-h-75{
  836.                 min-height: 75vh;
  837.             }
  838.             .m-h-60{
  839.                 min-height: 60vh;
  840.             }
  841.             .fs-7{
  842.                 font-size: 14px!important;
  843.             }
  844.             /* CSS: transición suave y origen del zoom centrado */
  845.             .zoom {
  846.                 transition: transform 0.3s ease;
  847.                 transform-origin: center center;
  848.             }
  849.             .out-of-stock {
  850.                 position: relative;
  851.                 opacity: 0.5; /* Da un efecto sombreado o deshabilitado */
  852.             }
  853.             .out-of-stock::after {
  854.                 content: \"AGOTADO\";
  855.                 position: absolute;
  856.                 top: 40%;
  857.                 left: 50%;
  858.                 transform: translate(-50%, -50%);
  859.                 background: rgba(255, 0, 0, 0.7);
  860.                 color: white;
  861.                 padding: 5px 15px;
  862.                 font-weight: bold;
  863.                 border-radius: 5px;
  864.             }
  865. </style>
  866.             
  867.         </style>
  868.         <meta charset=\"UTF-8\">
  869.         <title>{% block title %}Welcome!{% endblock %}</title>
  870.         <link rel=\"icon\" href=\"data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 128 128%22><text y=%221.2em%22 font-size=%2296%22>⚫️</text></svg>\">
  871.         {# Run `composer require symfony/webpack-encore-bundle` to start using Symfony UX #}
  872.         {% block stylesheets %}
  873.             {{ encore_entry_link_tags('app') }}
  874.         {% endblock %}
  875.         {% block javascripts %}
  876.             {{ encore_entry_script_tags('app') }}
  877.         {% endblock %}
  878.     </head>
  879.     <body>
  880.         
  881.         {% for label, messages in app.flashes %}
  882.             {% for message in messages %}
  883.                 <div class=\"alert alert-{{ label }} alert-dismissible fade show\"  role=\"alert\">
  884.                     {{ message }}
  885.                       <button type=\"button\" class=\"btn-close\" data-bs-dismiss=\"alert\" aria-label=\"Close\"></button>
  886.                 </div>
  887.             {% endfor %}
  888.         {% endfor %}
  889.         {% block body %}{% endblock %}
  890.         
  891.         <!-- Sidebar del carrito -->
  892.         <div id=\"cart-sidebar\" class=\"cart-sidebar\">
  893.             <!-- El contenido del carrito será cargado dinámicamente aquí -->
  894.         </div>
  895.         <!-- Footer -->
  896.         <footer class=\"bg-dark text-white pt-5\">
  897.             <div class=\"container\">
  898.                 <div class=\"row fs-7\">
  899.                     <!-- Políticas -->
  900.                     <div class=\"col-12 col-md-12 mb-4\">
  901.                         <h5 class=\"text-uppercase mb-4 d-none\">Políticas</h5>
  902.                         <ul class=\"list-unstyled d-md-flex d-block justify-content-start gap-3\">
  903.                             <li class=\"mb-2\"><a href=\"/politica-de-privacidad\" class=\"text-white text-decoration-none\">Política de Privacidad</a></li>
  904.                             <li class=\"mb-2\"><a href=\"/terminos-del-servicio\" class=\"text-white text-decoration-none\">Términos y Condiciones</a></li>
  905.                             <li class=\"mb-2\"><a href=\"/politica-de-cookies\" class=\"text-white text-decoration-none\">Política de Cookies</a></li>
  906.                             <li class=\"mb-2\"><a href=\"/politica-de-devoluciones\" class=\"text-white text-decoration-none\">Devoluciones</a></li>
  907.                             <li class=\"mb-2\"><a href=\"/contact\" class=\"text-white text-decoration-none\">Contáctanos</a></li>
  908.                         </ul>
  909.                     </div>
  910.                     <!-- Métodos de Pago -->
  911.                     <div class=\"col-12 col-md-4 mb-4 d-none\">
  912.                         <h5 class=\"text-uppercase mb-4\">Métodos de Pago</h5>
  913.                         <ul class=\"list-inline\">
  914.                             <li class=\"list-inline-item mb-2\">
  915.                                 <i class=\"bi bi-credit-card fs-4\" aria-label=\"Tarjetas de crédito\"></i>
  916.                                 <div class=\"small\">Tarjetas</div>
  917.                             </li>
  918.                             <!--<li class=\"list-inline-item mb-2\">
  919.                                 <i class=\"bi bi-paypal fs-4\" aria-label=\"PayPal\"></i>
  920.                                 <div class=\"small\">PayPal</div>
  921.                             </li>
  922.                             <li class=\"list-inline-item mb-2\">
  923.                                 <i class=\"bi bi-cash fs-4\" aria-label=\"Efectivo\"></i>
  924.                                 <div class=\"small\">Contraentrega</div>
  925.                             </li>-->
  926.                         </ul>
  927.                     </div>
  928.                     <!-- Métodos de Envío -->
  929.                     <div class=\"col-12 col-md-4 mb-4 d-none\">
  930.                         <h5 class=\"text-uppercase mb-4\">Envíos</h5>
  931.                         <ul class=\"list-inline\">
  932.                             <li class=\"list-inline-item mb-2\">
  933.                                 <i class=\"bi bi-truck fs-4\" aria-label=\"Envío estándar\"></i>
  934.                                 <div class=\"small\">Estándar</div>
  935.                             </li>
  936.                             <!--<li class=\"list-inline-item mb-2\">
  937.                                 <i class=\"bi bi-box-seam fs-4\" aria-label=\"Envío express\"></i>
  938.                                 <div class=\"small\">Express</div>
  939.                             </li>
  940.                             <li class=\"list-inline-item mb-2\">
  941.                                 <i class=\"bi bi-globe fs-4\" aria-label=\"Envío internacional\"></i>
  942.                                 <div class=\"small\">Internacional</div>
  943.                             </li>-->
  944.                         </ul>
  945.                     </div>
  946.                     
  947.                     <!-- Redes Sociales (extra) -->
  948.                     <!--<div class=\"col-12 col-md-3 mb-4\">
  949.                         <h5 class=\"text-uppercase mb-4\">Síguenos</h5>
  950.                         <div class=\"d-flex gap-3 justify-content-center\">
  951.                             <a href=\"#\" class=\"text-white\"><i class=\"bi bi-facebook fs-4\"></i></a>
  952.                             <a href=\"#\" class=\"text-white\"><i class=\"bi bi-instagram fs-4\"></i></a>
  953.                             <a href=\"#\" class=\"text-white\"><i class=\"bi bi-twitter-x fs-4\"></i></a>
  954.                             <a href=\"#\" class=\"text-white\"><i class=\"bi bi-tiktok fs-4\"></i></a>
  955.                         </div>
  956.                     </div>-->
  957.                 </div>
  958.                 <!-- Derechos de autor -->
  959.                 <div class=\"border-top pt-4\">
  960.                     <div class=\"row\">
  961.                         <div class=\"col-12 text-center\">
  962.                             <p class=\"small mb-0\">&copy; 2025 TcgBunker. Todos los derechos reservados.</p>
  963.                         </div>
  964.                     </div>
  965.                 </div>
  966.             </div>
  967.         </footer>
  968.         <!-- Barra de cookies -->
  969.         <div id=\"cookie-banner\" style=\"position: fixed; bottom: 0; left: 0; right: 0; background: #222; color: white; padding: 1em; display: none; z-index: 1000;\">
  970.             <div style=\"max-width: 800px; margin: auto; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap;\">
  971.                 <span>Este sitio usa cookies para mejorar tu experiencia. <a href=\"/politica-de-cookies\" style=\"color: #e50914;\">Leer más</a></span>
  972.                 <div>
  973.                 <button id=\"accept-cookies\" style=\"border: none; padding: 0.5em 1em; margin-left: 0.5em;\" class=\"btn btn-primary\">Aceptar</button>
  974.                 <button id=\"reject-cookies\" style=\"background: #555; color: #fff; border: none; padding: 0.5em 1em; margin-left: 0.5em;\" class=\"btn\">Rechazar</button>
  975.                 </div>
  976.             </div>
  977.         </div>
  978.         <script>
  979.             function cargarGA() {
  980.                 var gaScript = document.createElement('script');
  981.                 gaScript.src = 'https://www.googletagmanager.com/gtag/js?id=G-JL6JLQZRZR';
  982.                 gaScript.async = true;
  983.                 document.head.appendChild(gaScript);
  984.                 gaScript.onload = function () {
  985.                 window.dataLayer = window.dataLayer || [];
  986.                 function gtag(){ dataLayer.push(arguments); }
  987.                 window.gtag = gtag;
  988.                 gtag('js', new Date());
  989.                 gtag('config', 'G-JL6JLQZRZR');
  990.                 }
  991.             }
  992.             const banner = document.getElementById(\"cookie-banner\");
  993.             if (localStorage.getItem(\"cookies-consent\") === \"accepted\") {
  994.                 cargarGA();
  995.             } else if (localStorage.getItem(\"cookies-consent\") !== \"rejected\") {
  996.                 banner.style.display = \"block\";
  997.             }
  998.             document.getElementById(\"accept-cookies\").onclick = function () {
  999.                 localStorage.setItem(\"cookies-consent\", \"accepted\");
  1000.                 banner.style.display = \"none\";
  1001.                 cargarGA();
  1002.             };
  1003.             document.getElementById(\"reject-cookies\").onclick = function () {
  1004.                 localStorage.setItem(\"cookies-consent\", \"rejected\");
  1005.                 banner.style.display = \"none\";
  1006.                 // No se carga GA
  1007.             };
  1008.         </script>
  1009.         
  1010.         <script>
  1011.             AOS.init(); // Inicializar animaciones
  1012.         </script>
  1013.         <script>
  1014.             document.addEventListener('DOMContentLoaded', function () {
  1015.                 const headerHeight = document.querySelector('.header').offsetHeight;
  1016.                 document.querySelectorAll('a[href^=\"#\"]').forEach(anchor => {
  1017.                     anchor.addEventListener('click', function (e) {
  1018.                         e.preventDefault();
  1019.                         const target = document.querySelector(this.getAttribute('href'));
  1020.                         const offsetTop = target.offsetTop - headerHeight;
  1021.                         window.scrollTo({
  1022.                             top: offsetTop,
  1023.                             behavior: 'smooth'
  1024.                         });
  1025.                     });
  1026.                 });
  1027.             });
  1028.         </script>
  1029.         <script>
  1030.             
  1031.             \$(document).ready(function () {
  1032.                 const confirmationMessage = document.getElementById('confirmation-message');
  1033.                 // Manejar el clic en \"Añadir al carrito\"
  1034.                 \$('body').on('click','.addToCart', function () {
  1035.                     const \$parent = \$(this).closest('.product-row');
  1036.                     const productId = \$(this).data('product-id');
  1037.                     const quantity = \$parent.find('input[type=\"number\"]').val();
  1038.                     const open = \$(this).data('open') ?? false;
  1039.                     const goCheckout = \$(this).data('checkout') ?? false;
  1040.                     const extras = \$('#extraIngredients').val() || [];
  1041.                     const removals = \$('#removableIngredients').val() || [];
  1042.                     // Enviar solicitud AJAX
  1043.                     \$.ajax({
  1044.                         url: '/cart/add',
  1045.                         method: 'POST',
  1046.                         contentType: 'application/json',
  1047.                         data: JSON.stringify({
  1048.                             productId: productId,
  1049.                             quantity: parseInt(quantity),
  1050.                             extras: extras,
  1051.                             removals: removals
  1052.                         }),
  1053.                         success: function (data) {
  1054.                             if (data.success) {
  1055.                                 \$('.cartIconView').html(data.htmlCart);
  1056.                                 
  1057.                                 if(goCheckout){
  1058.                                     window.location.href = \"/checkout\";
  1059.                                 }
  1060.                                 if(open){
  1061.                                     \$('.cart-icon').trigger('click');
  1062.                                 }
  1063.                                 if(confirmationMessage && confirmationMessage.classList){
  1064.                                     confirmationMessage.classList.remove('d-none');
  1065.                                     // Ocultar el mensaje después de 3 segundos
  1066.                                     setTimeout(() => {
  1067.                                         confirmationMessage.classList.add('d-none');
  1068.                                     }, 3000);
  1069.                                 }
  1070.                                 
  1071.                             } else {
  1072.                                 alert('Hubo un problema al añadir el producto al carrito');
  1073.                             }
  1074.                         },
  1075.                         error: function () {
  1076.                             alert('Error de red al añadir el producto al carrito');
  1077.                         }
  1078.                     });
  1079.                 });
  1080.                 // Manejar el clic en los botones \"+\" y \"-\"
  1081.                 \$('#cart-sidebar').on('click', '.increment-btn, .decrement-btn', function () {
  1082.                     const productId = \$(this).data('product-id');
  1083.                     const action = \$(this).hasClass('increment-btn') ? 'increment' : 'decrement';
  1084.                     // Realizar solicitud AJAX al backend
  1085.                     \$.ajax({
  1086.                         url: '/cart/update',
  1087.                         method: 'POST',
  1088.                         data: JSON.stringify({
  1089.                             productId: productId,
  1090.                             action: action
  1091.                         }),
  1092.                         success: function (data) {
  1093.                             if (data.success) {
  1094.                                 const cartPanel = \$('#cart-sidebar');
  1095.                                 cartPanel.html(data.htmlSlider); // Actualizar el HTML del carrito
  1096.                                 const cartIcon = \$('.cartIconView');
  1097.                                 cartIcon.html(data.htmlCart);
  1098.                             } else {
  1099.                                 alert('Hubo un problema al actualizar el carrito');
  1100.                             }
  1101.                         },
  1102.                         error: function () {
  1103.                             alert('Error de red al actualizar el carrito');
  1104.                         }
  1105.                     });
  1106.                 });
  1107.                 // Manejar el clic en el ícono del carrito
  1108.                 \$('body').on('click' ,'.cart-icon', function () {
  1109.                     \$.ajax({
  1110.                         url: '/cart',
  1111.                         method: 'GET',
  1112.                         success: function (data) {
  1113.                             if (data.success) {
  1114.                                 const cartPanel = \$('#cart-sidebar');
  1115.                                 cartPanel.html(data.htmlSlider); // Insertar el HTML recibido
  1116.                                 cartPanel.addClass('open'); // Mostrar el panel lateral
  1117.                                 const cartIcon = \$('.cartIconView');
  1118.                                 cartIcon.html(data.htmlCart);
  1119.                             } else {
  1120.                                 alert('Hubo un problema al cargar el carrito');
  1121.                             }
  1122.                         },
  1123.                         error: function () {
  1124.                             alert('Error de red al cargar el carrito');
  1125.                         }
  1126.                     });
  1127.                 });
  1128.                 // Cerrar el carrito cuando se haga clic fuera del panel
  1129.                 \$(document).on('click', function (e) {
  1130.                     if (!\$(e.target).closest('#cart-sidebar, .cart-icon').length) {
  1131.                         \$('#cart-sidebar').removeClass('open');
  1132.                     }
  1133.                 });
  1134.                 // Cerrar el carrito cuando se haga clic en la x
  1135.                 \$(document).on('click', '.close-cart', function (e) {
  1136.                     console.log('here');
  1137.                     
  1138.                         \$('#cart-sidebar').removeClass('open');
  1139.                 });
  1140.                 // Manejar el clic en el botón de Checkout
  1141.                 \$(document).on('click', '#checkout-btn', function () {
  1142.                     window.location.href = '/checkout';
  1143.                 });
  1144.             });
  1145.         </script>
  1146.         <script>
  1147.             // JavaScript: ampliar/reducir al pasar/retirar el ratón
  1148.             document.addEventListener('DOMContentLoaded', () => {
  1149.             const zoomImages = document.querySelectorAll('img.zoom');
  1150.             zoomImages.forEach(img => {
  1151.                 img.addEventListener('mouseenter', () => {
  1152.                 img.style.transform = 'scale(1.1)';  // Ajusta 1.1 por el nivel de zoom deseado
  1153.                 });
  1154.                 img.addEventListener('mouseleave', () => {
  1155.                 img.style.transform = 'scale(1)';    // Vuelve al estado original
  1156.                 });
  1157.             });
  1158.             });
  1159.         </script>
  1160.     </body>
  1161. </html>
  1162. ""base.html.twig""/home/u619587673/domains/tcgbunker.shop/templates/base.html.twig");
  1163.     }
  1164. }