@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap");

body {
  font-family: "Poppins", sans-serif;
  background-color: #ffffff;
}

.gradient-bg {
  background: linear-gradient(135deg, #fdf2f8 0%, #f0f9ff 100%);
}

.product-card:hover {
  transform: translateY(-5px);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
  box-shadow:
    0 20px 25px -5px rgba(0, 0, 0, 0.1),
    0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.nav-link:hover {
  color: #ff6b8b;
}

.cart-item:hover {
  background-color: #fff0f3;
}

/* Animações */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in-up {
  animation: fadeInUp 0.6s ease-out forwards;
}

.fade-in {
  animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Utilitário para limitar texto a 2 linhas */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-clamp: 2;
}

/* Efeito de hover para ícones de categoria */
.category-card:hover .group-hover\:scale-110 {
  transform: scale(1.1);
}

/* Loading states */
.loading {
  opacity: 0.6;
  pointer-events: none;
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: #ff6b8b;
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: #e55a7a;
}

/* Focus states */
button:focus,
input:focus,
select:focus {
  outline: 2px solid #ff6b8b;
  outline-offset: 2px;
}

/* Responsive improvements */
@media (max-width: 768px) {
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}

/* ============== ESTILOS PARA PRODUTOS - AJUSTADOS ============== */
/* Container principal do card de produto */
.product-card {
  view-timeline-name: --product-card;
  view-timeline-axis: block;
  animation-timeline: --product-card;
  animation-range: entry 25% cover 50%;
  animation-name: fadeInUp;
  height: 100%;
  display: flex;
  flex-direction: column;
}

/* Container da imagem - MOSTRANDO IMAGEM COMPLETA */
.product-image-wrapper {
  width: 100%;
  height: 200px; /* Altura fixa */
  overflow: hidden;
  border-radius: 12px 12px 0 0;
  position: relative;
  background: linear-gradient(135deg, #fdf2f8 0%, #f0f9ff 100%);
  flex-shrink: 0;
  display: flex; /* Adicionado */
  align-items: center; /* Centraliza verticalmente */
  justify-content: center; /* Centraliza horizontalmente */
  padding: 20px; /* Espaço interno para a imagem respirar */
}

/* Badge de desconto */
.discount-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: linear-gradient(135deg, #ff6b8b 0%, #ff3d6d 100%);
  color: white;
  font-weight: bold;
  font-size: 0.875rem;
  padding: 4px 10px;
  border-radius: 20px;
  z-index: 10;
  box-shadow: 0 2px 8px rgba(255, 107, 139, 0.3);
}

/* IMAGEM MOSTRANDO COMPLETA E OCUPANDO ESPAÇO MÁXIMO */
.product-image-wrapper img {
  max-width: 100%; /* Limita à largura do container */
  max-height: 100%; /* Limita à altura do container */
  width: auto; /* Mantém proporção original */
  height: auto; /* Mantém proporção original */
  object-fit: contain; /* MOSTRA IMAGEM INTEIRA E PREENCHE ESPAÇO */
  display: block;
  transition: transform 0.5s ease;
}

/* Efeito de zoom suave */
.product-card:hover .product-image-wrapper img {
  transform: scale(1.05);
}

/* Container do conteúdo */
.product-content {
  padding: 16px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

/* Nome do produto */
.product-name {
  font-size: 1rem;
  font-weight: 600;
  color: #333;
  margin-bottom: 8px;
  line-height: 1.3;
}

/* Preços */
.product-prices {
  margin-bottom: 12px;
}

.current-price {
  font-size: 1.25rem;
  font-weight: bold;
  color: #ff6b8b;
  display: block;
}

.original-price {
  font-size: 0.875rem;
  color: #999;
  text-decoration: line-through;
  display: block;
}

/* Categoria */
.product-category {
  font-size: 0.75rem;
  color: #666;
  background: #f5f5f5;
  padding: 4px 10px;
  border-radius: 12px;
  display: inline-block;
  margin-bottom: 16px;
  align-self: flex-start;
}

/* Botão de adicionar */
.add-to-cart-btn {
  background: linear-gradient(135deg, #ff6b8b 0%, #ff3d6d 100%);
  color: white;
  border: none;
  padding: 10px 16px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: auto;
  width: 100%;
}

.add-to-cart-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 107, 139, 0.4);
}

/* Para todos os produtos */
#featured-products .product-card {
  height: 100%;
}

/* Responsividade */
@media (max-width: 768px) {
  .product-image-wrapper {
    height: 180px;
    padding: 15px;
  }
}

@media (max-width: 640px) {
  .product-image-wrapper {
    height: 160px;
    padding: 12px;
  }

  .product-content {
    padding: 12px;
  }
}

@media (max-width: 480px) {
  .product-image-wrapper {
    height: 140px;
    padding: 10px;
  }
}
