/**
 * CONVERSION OPTIMIZATION CSS
 * Focado em aumentar a taxa de conversão e finalização de pedidos
 */

/* ============================================================================
   URGÊNCIA E ESCASSEZ
   ============================================================================ */
.urgency-badge {
  background: linear-gradient(135deg, #ff4757 0%, #ee5a6f 50%, #c44569 100%);
  color: #fff;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 800;
  display: inline-block;
  animation: pulse-urgency 2s infinite;
  box-shadow: 0 4px 12px rgba(255, 71, 87, 0.4), 0 0 20px rgba(255, 71, 87, 0.2);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  position: relative;
  overflow: hidden;
}

.urgency-badge::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  animation: shine 3s infinite;
}

@keyframes shine {
  0% { left: -100%; }
  100% { left: 100%; }
}

@keyframes pulse-urgency {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 2px 8px rgba(231, 76, 60, 0.3);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 4px 16px rgba(231, 76, 60, 0.5);
  }
}

.stock-warning {
  background: #fff3cd;
  border: 2px solid #ffc107;
  color: #856404;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.stock-warning::before {
  content: "⚠️";
  font-size: 16px;
}

/* ============================================================================
   CTAs OTIMIZADOS PARA CONVERSÃO
   ============================================================================ */
.add-to-cart-btn,
.cart-checkout-btn,
.next-step-btn,
.finalize-btn {
  position: relative;
  overflow: hidden;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 1px !important;
  box-shadow: 0 4px 16px rgba(193, 30, 36, 0.4) !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.add-to-cart-btn::before,
.cart-checkout-btn::before,
.next-step-btn::before,
.finalize-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.5s;
}

.add-to-cart-btn:hover::before,
.cart-checkout-btn:hover::before,
.next-step-btn:hover::before,
.finalize-btn:hover::before {
  left: 100%;
}

.add-to-cart-btn:hover,
.cart-checkout-btn:hover,
.next-step-btn:hover,
.finalize-btn:hover {
  transform: translateY(-3px) !important;
  box-shadow: 0 8px 24px rgba(193, 30, 36, 0.5) !important;
}

.add-to-cart-btn:active,
.cart-checkout-btn:active,
.next-step-btn:active,
.finalize-btn:active {
  transform: translateY(-1px) !important;
}

/* CTA com destaque extra */
.cta-primary {
  background: linear-gradient(135deg, #C11E24 0%, #a0181d 100%) !important;
  font-size: 18px !important;
  padding: 18px 32px !important;
  position: relative;
}

.cta-primary::after {
  display: none; /* Removido para usar seta do HTML */
}

@keyframes arrow-bounce {
  0%, 100% {
    transform: translateX(0);
  }
  50% {
    transform: translateX(5px);
  }
}

/* ============================================================================
   PROVA SOCIAL
   ============================================================================ */
.social-proof {
  background: #f8f9fa;
  border-left: 4px solid #077c22;
  padding: 12px 16px;
  border-radius: 8px;
  margin: 16px 0;
  font-size: 13px;
}

.social-proof-item {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.social-proof-item:last-child {
  margin-bottom: 0;
}

.social-proof-icon {
  color: #077c22;
  font-size: 16px;
}

.recent-orders {
  font-size: 12px;
  color: #666;
  margin-top: 8px;
  font-style: italic;
}

/* ============================================================================
   ELEMENTOS DE CONVERSÃO NA PÁGINA DE PRODUTO
   ============================================================================ */
.product-page-urgency {
  background: linear-gradient(135deg, #fff5f5 0%, #ffe5e5 100%);
  border: 2px solid #C11E24;
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 10px;
  text-align: center;
}

.product-page-urgency-title {
  font-size: 14px;
  font-weight: 700;
  color: #C11E24;
  margin-bottom: 4px;
}

.product-page-urgency-text {
  font-size: 12px;
  color: #666;
}

/* ============================================================================
   CHECKOUT OTIMIZADO
   ============================================================================ */
.checkout-trust-badges {
  display: flex;
  justify-content: center;
  gap: 20px;
  padding: 20px;
  background: #f8f9fa;
  border-radius: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.trust-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #666;
}

.trust-badge-icon {
  font-size: 24px;
  color: #077c22;
}

.checkout-security {
  text-align: center;
  padding: 12px;
  background: #f0f9f0;
  border-radius: 8px;
  margin-top: 16px;
  font-size: 12px;
  color: #077c22;
}

/* ============================================================================
   CARRINHO OTIMIZADO
   ============================================================================ */
.cart-empty-cta {
  text-align: center;
  padding: 30px 20px;
}

.cart-empty-cta-btn {
  background: linear-gradient(135deg, #C11E24 0%, #a0181d 100%);
  color: #fff;
  padding: 14px 28px;
  border-radius: 8px;
  font-weight: 700;
  text-decoration: none;
  display: inline-block;
  margin-top: 16px;
  transition: all 0.3s;
}

.cart-empty-cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(193, 30, 36, 0.4);
}

/* ============================================================================
   ELEMENTOS DE DESTAQUE
   ============================================================================ */
.highlight-box {
  background: linear-gradient(135deg, #fff9e6 0%, #fff5d6 100%);
  border: 2px solid #ffc107;
  border-radius: 12px;
  padding: 16px;
  margin: 16px 0;
}

.highlight-box-title {
  font-weight: 700;
  color: #856404;
  margin-bottom: 8px;
  font-size: 16px;
}

.highlight-box-text {
  color: #856404;
  font-size: 14px;
  line-height: 1.5;
}

/* ============================================================================
   BANNERS DE CONVERSÃO
   ============================================================================ */
.conversion-banner {
  background: linear-gradient(135deg, #C11E24 0%, #a0181d 100%);
  color: #fff;
  padding: 16px 20px;
  border-radius: 12px;
  margin: 20px 0;
  text-align: center;
  box-shadow: 0 4px 16px rgba(193, 30, 36, 0.3);
}

.conversion-banner-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 8px;
}

.conversion-banner-text {
  font-size: 14px;
  opacity: 0.95;
}

/* ============================================================================
   PRODUTOS COM DESTAQUE
   ============================================================================ */
.product-item-featured {
  position: relative;
  border: 3px solid #C11E24 !important;
  box-shadow: 0 4px 16px rgba(193, 30, 36, 0.2) !important;
}

.product-item-featured::before {
  content: '⭐ MAIS VENDIDO';
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: #C11E24;
  color: #fff;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  z-index: 10;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* ============================================================================
   ANIMAÇÕES DE ATENÇÃO
   ============================================================================ */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

.attention-shake {
  animation: shake 0.5s;
}

/* ============================================================================
   MOBILE OPTIMIZATIONS
   ============================================================================ */
@media (max-width: 768px) {
  .add-to-cart-btn,
  .cart-checkout-btn,
  .next-step-btn,
  .finalize-btn {
    font-size: 16px !important;
    padding: 16px 24px !important;
  }
  
  .cta-primary {
    font-size: 16px !important;
    padding: 16px 24px !important;
  }
  
  .conversion-banner-title {
    font-size: 18px;
  }
  
  .checkout-trust-badges {
    gap: 12px;
    padding: 16px;
  }
}

