/* =================================================================== */
/* ANIMAÇÕES GLOBAIS (Keyframes) */
/* =================================================================== */

@keyframes fade-in {
    from { background-color: rgba(0, 0, 0, 0); }
    to { background-color: rgba(0, 0, 0, 0.8); }
}
@keyframes fade-out {
    from { background-color: rgba(0, 0, 0, 0.8); }
    to { background-color: rgba(0, 0, 0, 0); }
}
@keyframes slide-in {
    from { transform: translateX(500px); }
    to { transform: translateX(0px); }
}
@keyframes slide-out {
    from { transform: translateX(0px); }
    to { transform: translateX(500px); }
}
@keyframes dialog-in {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}
@keyframes dialog-out {
    from { opacity: 1; transform: scale(1); }
    to { opacity: 0; transform: scale(0.9); }
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes float {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-20px); }
  100% { transform: translateY(0px); }
}
@keyframes pulse {
    0% {
        box-shadow: 0 5px 15px rgba(var(--primary), 0.4);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 8px 25px rgba(var(--primary), 0.6);
        transform: scale(1.05);
    }
    100% {
        box-shadow: 0 5px 15px rgba(var(--primary), 0.4);
        transform: scale(1);
    }
}
@keyframes floatItem1 {
  0% { transform: translate(0, 0); }
  50% { transform: translate(-15px, 20px); }
  100% { transform: translate(0, 0); }
}
@keyframes floatItem2 {
  0% { transform: translate(0, 0); }
  50% { transform: translate(20px, -15px); }
  100% { transform: translate(0, 0); }
}
@keyframes floatItem3 {
  0% { transform: translate(0, 0); }
  50% { transform: translate(15px, 25px); }
  100% { transform: translate(0, 0); }
}
@keyframes floatItem4 {
  0% { transform: translate(0, 0); }
  50% { transform: translate(-25px, -10px); }
  100% { transform: translate(0, 0); }
}
@keyframes floatItem5 {
  0% { transform: translate(0, 0); }
  50% { transform: translate(10px, -20px); }
  100% { transform: translate(0, 0); }
}
@keyframes marquee-scroll {
  from { transform: translateY(0); }
  to { transform: translateY(-50%); }
}

/* =================================================================== */
/* CLASSES DE ANIMAÇÃO E LAYOUT BASE */
/* =================================================================== */

.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.animate-on-scroll.animate {
    opacity: 1;
    transform: translateY(0);
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 15px;
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
}
.section-title::after {
    content: '';
    position: absolute;
    width: 80px;
    height: 4px;
    background: linear-gradient(to right, rgb(var(--primary)), rgba(var(--primary), 0.5));
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 2px;
}
.section-subtitle {
    font-size: 1.1rem;
    text-align: center;
    color: rgb(var(--gray));
    margin-bottom: 50px;
}

/* =================================================================== */
/* CARRINHO, DIÁLOGOS E MODAIS */
/* =================================================================== */

#cart-drawer[data-state="open"] { animation: fade-in 0.4s forwards; }
#cart-drawer[data-state="closed"] { animation: fade-out 0.4s forwards; }
#cart-drawer[data-state="open"] > div { animation: slide-in 0.4s forwards; }
#cart-drawer[data-state="closed"] > div { animation: slide-out 0.4s forwards; }

.dialog[data-state="open"] { animation: fade-in 0.4s forwards; }
.dialog[data-state="closed"] { animation: fade-out 0.4s forwards; }
.dialog[data-state="open"] > div { animation: dialog-in 0.2s forwards; }
.dialog[data-state="closed"] > div { animation: dialog-out 0.2s forwards; }

/* =================================================================== */
/* COMPONENTES ESTILO ZENVITY */
/* =================================================================== */

.btn-primary {
    display: inline-block;
    padding: 12px 24px;
    background: linear-gradient(45deg, rgb(var(--primary)), rgba(var(--primary), 0.7));
    color: rgb(var(--light));
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(var(--primary), 0.4);
}
.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(var(--primary), 0.6);
}
.btn-primary.pulse {
    animation: pulse 2s infinite;
}

.btn-secondary {
    display: inline-block;
    padding: 12px 24px;
    background: transparent;
    color: rgb(var(--light));
    border: 2px solid rgb(var(--primary));
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
}
.btn-secondary:hover {
    background-color: rgb(var(--primary));
    color: rgb(var(--darker));
    transform: translateY(-3px);
}

.zen-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.01));
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 30px;
    transition: all 0.3s ease;
    height: 100%;
}
.zen-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    border-color: rgb(var(--primary));
}

.floating-item {
    position: absolute;
    width: 65px;
    height: 65px;
    background-color: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    animation-timing-function: ease-in-out;
    animation-iteration-count: infinite;
}
.floating-item i {
  color: rgb(var(--primary));
  font-size: 2rem;
}

.highlight {
    color: rgb(var(--primary));
}

/* =================================================================== */
/* PÁGINA DE FEEDBACKS */
/* =================================================================== */

.feedback-marquee {
  display: flex;
  gap: 2rem;
  overflow: hidden;
  height: 80vh;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 10%, #000 90%, transparent);
  mask-image: linear-gradient(to bottom, transparent, #000 10%, #000 90%, transparent);
}
.feedback-column {
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  animation: marquee-scroll 40s linear infinite;
}

/* =================================================================== */
/* POP-UP DE NOTIFICAÇÃO DE VENDAS */
/* =================================================================== */

@keyframes sales-popup-gradient {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.apx-purchase-popup {
    position: fixed;
    bottom: 25px;
    left: 25px;
    z-index: 1001;
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 20px;
    font-family: 'Poppins', sans-serif;
    color: rgb(var(--light));
    background: linear-gradient(135deg, rgba(var(--primary), 0.2), rgba(var(--primary), 0.1));
    backdrop-filter: blur(10px);
    border: 1px solid rgba(var(--primary), 0.3);
    border-radius: var(--radius);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    opacity: 0;
    transform: translateX(-120%);
    pointer-events: none;
    transition: opacity 0.6s ease-in-out, transform 0.6s ease-in-out;
}
.apx-purchase-popup.show {
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
}
.apx-purchase-popup::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius);
    padding: 1px;
    background: linear-gradient(90deg, transparent, rgb(var(--primary)), transparent);
    background-size: 200% 100%;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    animation: sales-popup-gradient 3s linear infinite;
}
.apx-purchase-popup .popup-icon i {
    font-size: 1.8rem;
    color: rgb(var(--primary));
}
.apx-purchase-popup .popup-text p {
    margin: 0;
    font-size: 0.85rem;
    line-height: 1.4;
    color: rgb(var(--gray));
}
.apx-purchase-popup .popup-text .popup-name,
.apx-purchase-popup .popup-text .popup-product {
    font-weight: 600;
    color: rgb(var(--light));
}

/* =================================================================== */
/* AJUSTES RESPONSIVOS */
/* =================================================================== */

@media (min-width: 768px) {
  .feedback-column {
    width: calc(50% - 1rem);
  }
}
@media (min-width: 1024px) {
  .feedback-column {
    width: calc(100% / 3 - 1.5rem);
  }
}
@media (max-width: 767px) {
  .feedback-column {
    width: 100%;
  }
  .feedback-marquee {
    gap: 0;
  }
  .feedback-column:nth-child(2), .feedback-column:nth-child(3) {
      display: none;
  }
  .hero-image {
    width: 280px;
    height: 280px;
    margin-top: 2rem;
  }
  .hero-image > div:first-child {
      width: 220px;
      height: 220px;
  }
  .floating-item {
     width: 55px;
     height: 55px;
  }
  .floating-item i {
     font-size: 1.6rem;
  }
   .apx-purchase-popup {
        max-width: calc(100vw - 40px);
        bottom: 20px;
        left: 20px;
    }
}

/* =================================================================== */
/* EFEITO DE BRILHO PARA BOTÕES ESPECIAIS (NOVO) */
/* =================================================================== */

.btn-glow {
    position: relative;
    z-index: 1;
    overflow: hidden;
    border-radius: 50px; /* Garante que o brilho siga a borda do botão */
}
.btn-glow::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 250%; /* Aumentado para um efeito mais suave */
    height: 250%;
    background: conic-gradient(
        transparent,
        rgba(var(--primary), 0.4),
        transparent 20%
    );
    transform: translate(-50%, -50%);
    animation: rotate-glow 4s linear infinite;
    z-index: -1;
    transition: opacity 0.4s ease;
    opacity: 0;
}
.btn-glow:hover::before {
    opacity: 1;
}

@keyframes rotate-glow {
    from {
        transform: translate(-50%, -50%) rotate(0deg);
    }
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

@media (max-width: 640px) {
  .btn-secondary.btn-compact {
    padding: 8px 12px;
    font-size: 0.8rem; /* 12.8px */
  }
}

/* =================================================================== */
/* CARD DE PRODUTO FINAL E RESPONSIVO */
/* =================================================================== */

.product-card-final {
  background: rgb(var(--dark));
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 1rem; /* 16px */
  overflow: hidden; /* Importante para o efeito de hover na imagem */
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  position: relative; /* Contexto para o ícone de entrega automática */
}

.product-card-final:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(var(--primary), 0.15);
}

.product-card-final .info-icon-container {
  background-color: rgba(var(--primary), 0.15);
  border: 1px solid rgba(var(--primary), 0.3);
  color: rgb(var(--primary));
  width: 2rem; /* 32px */
  height: 2rem; /* 32px */
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
}

/* =================================================================== */
/* AJUSTES FINOS PARA O CARD DE PRODUTO NO MOBILE */
/* =================================================================== */

@media (max-width: 640px) { /* Estas regras só aplicam em telas de celular */

  /* 1. Remove a borda do ícone de entrega automática no mobile */
  .product-card-final .group\/tooltip > div {
    border: none;
    background-color: transparent;
    backdrop-filter: none; /* Remove o desfoque também para um visual mais limpo */
  }

  /* 2. Diminui o botão "Comprar agora" no mobile */
  .product-card-final .btn-secondary {
    padding: 8px 12px;   /* Padding mais compacto */
    border-width: 1.5px; /* Borda um pouco mais fina */
    font-size: 0.8rem;   /* Fonte do texto levemente menor */
  }

  /* 3. Ajuste fino no tamanho do ícone de pagamento para garantir alinhamento */
  .product-card-final .fa-pix,
  .product-card-final .fa-credit-card {
    font-size: 1.25rem; /* Equivalente a text-xl */
  }
}
/* =================================================================== */
/* AJUSTES FINAIS PARA O CARD RESPONSIVO */
/* =================================================================== */

@media (max-width: 640px) { /* Regras aplicadas apenas em telas de celular */

  /* Diminui o botão "Comprar agora" no card */
  .product-card-final .btn-secondary {
    padding-top: 0.5rem;    /* 8px */
    padding-bottom: 0.5rem; /* 8px */
    font-size: 0.875rem;    /* 14px */
    border-width: 1.5px;      /* Borda mais fina */
  }

  /* Diminui o ícone de entrega automática */
  .product-card-final .zap-icon-container {
    width: 1.5rem;  /* 24px */
    height: 1.5rem; /* 24px */
  }

  .product-card-final .zap-icon-container i {
    width: 0.875rem; /* 14px */
    height: 0.875rem;/* 14px */
  }
}

/* =================================================================== */
/* ESTILOS DO POP-UP DE CHAT COM IA */
/* =================================================================== */

/* Esconde a janela do chat por padrão */
#chat-window.hidden {
    display: none;
}

/* Animação de entrada e saída da janela */
#chat-window.active {
    display: flex;
    animation: chat-fade-in 0.3s ease-out forwards;
}

@keyframes chat-fade-in {
    from {
        opacity: 0;
        transform: translateY(1rem);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#chat-window.hidden {
    display: none;
}

#chat-window.active {
    display: flex;
    animation: chat-fade-in 0.3s ease-out forwards;
}

#chat-messages {
    flex-grow: 1; /* Permite que a área de mensagens cresça */
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-height: 50vh; /* Altura máxima de 50% da tela */
    overflow-y: auto; /* Adiciona barra de rolagem quando necessário */
}

#chat-messages .user-message, 
#chat-messages .ai-message {
    max-width: 85%;
    padding: 10px 15px;
    border-radius: 20px;
    line-height: 1.4;
    word-wrap: break-word;
}
#chat-messages .user-message {
    background-color: rgb(var(--primary));
    color: black;
    border-bottom-right-radius: 5px;
    margin-left: auto;
}
#chat-messages .ai-message {
    background-color: rgb(var(--dark));
    border: 1px solid rgb(var(--border));
    color: rgb(var(--light));
    border-bottom-left-radius: 5px;
    margin-right: auto;
}
.typing-indicator {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 12px 15px;
}
.typing-indicator span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: rgb(var(--gray));
    animation: typing-bubble 1.2s infinite ease-in-out;
}
.typing-indicator span:nth-child(2) {
    animation-delay: 0.2s;
}
.typing-indicator span:nth-child(3) {
    animation-delay: 0.4s;
}
@keyframes typing-bubble {
    0%, 80%, 100% {
        transform: scale(0);
    }
    40% {
        transform: scale(1.0);
    }
}