/** Shopify CDN: Minification failed

Line 52:29 Unexpected "-->"
Line 230:0 Unexpected "<"
Line 238:10 Expected ":"
Line 239:4 Expected identifier but found "setTimeout("
Line 245:11 Unexpected "hideChat("
Line 246:10 Expected ":"
Line 247:10 Expected ":"
Line 248:4 Expected identifier but found "setTimeout("
Line 253:11 Unexpected "toggleChat("
Line 254:7 Unexpected "("
... and 9 more hidden warnings

**/
/*-----------------------------------------------------------------------------/
/ Custom Theme CSS
/-----------------------------------------------------------------------------*/

/*---------------- Global Custom CSS -------------------*//*! Code css #t4s_custom_color */ .t4s-badge-item.t4s-badge-limited-edition{ background-color: #222222;color: #ffffff }.t4s-badge-item.t4s-badge-pre-order{ background-color: #222222;color: #fff }/*---------------- Custom CSS for only desktop -------------------*/
@media (min-width: 1025px) {/* Imagen del producto fija al hacer scroll */
  .product__media-wrapper {
    position: -webkit-sticky;
    position: sticky;
    top: 120px;
    z-index: 5;
    align-self: flex-start;
  }

  .product__media {
    display: flex;
    flex-direction: column;
    height: 100%;
  }

  .product__page .product__media {
    min-height: 100vh;
  }
}

/*---------------- Custom CSS para tablet y móvil -------------------*/
@media (max-width: 1024px) {}

/*---------------- Custom CSS solo para tablet -------------------*/
@media (min-width: 768px) and (max-width: 1024px) {}

/*---------------- Custom CSS solo para móvil -------------------*/
@media (max-width: 767px) {}



<!-- BOTÓN flotante FIRMACH -->
<div id="firmach-whatsapp-widget">
  <div class="chat-widget" id="chatWidget">
    <div class="chat-header">
      <img src="/cdn/shop/files/Diseno_sin_titulo.png?v=1753565495" alt="FIRMACH" class="chat-avatar">
      <div class="chat-info">
        <strong>FIRMACH</strong>
        <span>Responde en pocos minutos</span>
      </div>
      <div class="chat-close" onclick="closeChat()">×</div>
    </div>
    <div class="chat-body">
      <p>
        ¡Hola! 👋<br>
        <strong>Somos FIRMACH</strong>, un estudio creativo que hace <em>retratos imposibles</em>. 🎨✨<br>
        Convertimos fotos en obras de arte únicas, llenas de emoción y significado.  
        <br><br><strong>¿Quieres uno?</strong> 💛<br>
        ¡Escríbenos y creemos juntos algo extraordinario!
      </p>
      <a href="https://wa.me/573024600198?text=Hola%2C%20vengo%20de%20la%20p%C3%A1gina%20web.%20Estoy%20interesado%20en%20un%20retrato%20imposible%20de%20FIRMACH%2C%20por%20favor%20reg%C3%A1lame%20informaci%C3%B3n." class="chat-btn" target="_blank">
        <i class="fab fa-whatsapp"></i> Iniciar chat
      </a>
    </div>
  </div>

  <!-- Botón flotante -->
  <div class="whatsapp-float" onclick="toggleChat()">
    <i class="fab fa-whatsapp"></i> WhatsApp
    <span class="red-dot"></span>
  </div>
</div>

<!-- Font Awesome -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">

<!-- ESTILOS -->
<style>
#firmach-whatsapp-widget {
  position: fixed;
  bottom: 90px;
  left: 20px;
  z-index: 9999;
}

.whatsapp-float {
  background-color: #25D366;
  color: white;
  padding: 10px 18px;
  border-radius: 40px;
  font-weight: bold;
  font-family: 'Poppins', sans-serif;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.whatsapp-float .red-dot {
  background: red;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  position: absolute;
  top: 4px;
  right: 6px;
}

.chat-widget {
  width: 320px;
  max-width: 90vw;
  background: white;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.15);
  overflow: hidden;
  font-family: 'Poppins', sans-serif;
  display: none;
  flex-direction: column;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.4s ease, transform 0.4s ease;
  position: fixed;
  bottom: 160px;
  left: 20px;
}

@media (max-width: 480px) {
  #firmach-whatsapp-widget {
    bottom: 80px;
    left: 15px;
  }

  .chat-widget {
    width: 92vw;
    left: 4%;
    bottom: 120px;
    border-radius: 12px;
  }

  .whatsapp-float {
    font-size: 14px;
    padding: 10px 14px;
  }
}

.chat-widget.show {
  display: flex;
  opacity: 1;
  transform: translateY(0);
}

.chat-widget.hide {
  opacity: 0;
  transform: translateY(30px);
}

.chat-header {
  background: #1C1C1C; /* Fondo oscuro */
  color: white;
  display: flex;
  align-items: center;
  padding: 12px;
  gap: 12px;
}

.chat-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #fff;
}

.chat-info {
  flex-grow: 1;
}

.chat-info span {
  font-size: 12px;
  color: #CFCFCF;
}

.chat-close {
  font-size: 20px;
  cursor: pointer;
  font-weight: bold;
}

.chat-body {
  padding: 16px;
  font-size: 14px;
  color: #333;
}

.chat-btn {
  margin-top: 10px;
  display: inline-block;
  background: #F6BD40; /* Amarillo personalizado */
  color: #1C1C1C;       /* Texto negro */
  padding: 10px 16px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-family: 'Poppins', sans-serif;
  transition: background 0.3s ease;
  text-align: center;
}

.chat-btn:hover {
  background: #e0a92e;
}
</style>

<!-- SCRIPT -->
<script>
  const widget = document.getElementById('chatWidget');
  let autoShown = false;

  function showChat() {
    widget.style.display = 'flex';
    setTimeout(() => {
      widget.classList.add('show');
      widget.classList.remove('hide');
    }, 10);
  }

  function hideChat() {
    widget.classList.remove('show');
    widget.classList.add('hide');
    setTimeout(() => {
      widget.style.display = 'none';
    }, 400);
  }

  function toggleChat() {
    if (widget.classList.contains('show')) {
      hideChat();
    } else {
      showChat();
    }
    sessionStorage.setItem('chatClicked', 'true');
  }

  function closeChat() {
    hideChat();
    sessionStorage.setItem('chatClicked', 'true');
  }

  window.addEventListener('load', () => {
    const alreadyClicked = sessionStorage.getItem('chatClicked');
    if (!alreadyClicked) {
      setTimeout(() => {
        showChat();
        autoShown = true;

        setTimeout(() => {
          if (autoShown) {
            hideChat();
          }
        }, 5000); // se cierra tras 5 segundos visibles
      }, 5000); // aparece 5 segundos después
    }
  });

  document.querySelector('.chat-close').addEventListener('click', () => {
    autoShown = false;
    sessionStorage.setItem('chatClicked', 'true');
  });
</script>