/* Cards Modernos Aprimorados */
.card-home {
  position: relative;
  background: rgba(30, 41, 59, 0.13);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 1.5rem;
  box-shadow: 0 8px 32px 0 rgba(225, 29, 72, 0.12);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  min-height: 26rem;
}

.card-home:hover {
  transform: translateY(-12px) scale(1.02);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15), 0 0 30px rgba(225, 29, 72, 0.2);
  border-color: rgba(225, 29, 72, 0.3);
}

/* Efeito de brilho aprimorado */
.card-home::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
  transition: left 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1;
}

.card-home:hover::before {
  left: 100%;
}

/* Gradiente de topo decorativo */
.card-home .gradient-top {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, #e11d48, #f59e42, #1e293b);
  opacity: 0;
  transition: opacity 0.5s ease;
}

.card-home:hover .gradient-top {
  opacity: 1;
}

/* Container de imagem aprimorado */
.card-home .image-container {
  position: relative;
  width: 100%;
  height: 16rem;
  border-radius: 1rem;
  overflow: hidden;
  background: linear-gradient(135deg, #f8fafc, #e2e8f0);
  margin-bottom: 1rem;
}

.card-home .image-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: all 0.5s ease;
  border-radius: 1rem;
}

.card-home:hover .image-container img {
  transform: scale(1.1);
  filter: brightness(1.05);
}

/* Overlay da imagem */
.card-home .image-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 0%, rgba(225, 29, 72, 0.05) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
  border-radius: 1rem;
}

.card-home:hover .image-overlay {
  opacity: 1;
}

/* Badges */
.card-home .badge {
  position: absolute;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.025em;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.card-home .badge-category {
  top: 0.75rem;
  left: 0.75rem;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #1e293b;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.card-home .badge-highlight {
  top: 0.75rem;
  right: 0.75rem;
  background: linear-gradient(45deg, #e11d48, #f59e42);
  color: white;
  animation: pulse 2s infinite;
}

/* Estado esgotado */
.card-home .sold-out-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 1rem;
}

/* Informações do produto */
.card-home .product-info {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  flex-grow: 1;
  padding: 0 1rem;
}

.card-home .product-title {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: #1e293b;
  text-align: center;
  line-height: 1.3;
  transition: color 0.3s ease;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-home:hover .product-title {
  color: #e11d48;
}

.card-home .product-price {
  font-size: 1.5rem;
  font-weight: 900;
  background: linear-gradient(45deg, #e11d48, #f59e42, #1e293b);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 1rem;
}

/* Botão de compra aprimorado */
.card-home .btn-buy {
  position: relative;
  width: 100%;
  padding: 1rem;
  background: linear-gradient(135deg, #1e293b 0%, #334155 50%, #475569 100%);
  color: white;
  font-weight: 700;
  border: none;
  border-radius: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: auto;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(30, 41, 59, 0.3);
}

.card-home .btn-buy::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

.card-home .btn-buy:hover::before {
  left: 100%;
}

.card-home .btn-buy:hover {
  background: linear-gradient(135deg, #e11d48 0%, #f59e42 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(225, 29, 72, 0.4);
}

.card-home .btn-buy:disabled {
  background: #9ca3af;
  cursor: not-allowed;
  opacity: 0.6;
}

.card-home .btn-buy:disabled:hover {
  transform: none;
  background: #9ca3af;
  box-shadow: 0 4px 12px rgba(156, 163, 175, 0.3);
}

/* Animações de entrada escalonada */
.card-home {
  opacity: 0;
  transform: translateY(20px);
  animation: cardFadeIn 0.6s ease-out forwards;
}

.card-home:nth-child(1) { animation-delay: 0.1s; }
.card-home:nth-child(2) { animation-delay: 0.2s; }
.card-home:nth-child(3) { animation-delay: 0.3s; }
.card-home:nth-child(4) { animation-delay: 0.4s; }
.card-home:nth-child(5) { animation-delay: 0.5s; }
.card-home:nth-child(6) { animation-delay: 0.6s; }

@keyframes cardFadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsividade */
@media (max-width: 768px) {
  .card-home {
    min-height: 24rem;
  }
  .card-home .image-container {
    height: 14rem;
  }
  /* Reduz ainda mais a fonte dos títulos e preços dos cards no celular */
  .card-home .product-title {
    font-size: 0.85rem;
  }
  .card-home .product-price {
    font-size: 1rem;
  }
}
