/* Enhanced Product Cards */

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

.product-card {
  background: #ffffff;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04), 0 2px 4px rgba(0, 0, 0, 0.02);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border: 2px solid #f8fafc;
  position: relative;
}

.product-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #2563eb, #06b6d4);
  transform: scaleX(0);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.product-card:hover {
  transform: translateY(-10px) scale(1.01);
  box-shadow: 0 20px 40px rgba(37, 99, 235, 0.12), 0 8px 16px rgba(37, 99, 235, 0.08);
  border-color: #dbeafe;
}

.product-card:hover::before {
  transform: scaleX(1);
}

.product-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

/* Product Image */
.product-image {
  position: relative;
  width: 100%;
  height: 260px;
  overflow: hidden;
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  border-radius: 16px 16px 0 0;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.product-card:hover .product-image img {
  transform: scale(1.1);
}

/* Image Overlay */
.product-image::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.4), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.product-card:hover .product-image::after {
  opacity: 1;
}

/* Favorite Button - Removed */

/* Badges */
.badge-new,
.badge-featured {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.badge-new {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
}

.badge-featured {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: white;
  top: 48px;
}

/* Product Info */
.product-info {
  padding: 12px 16px;
  background: linear-gradient(180deg, #ffffff 0%, #fafbfc 100%);
}

.product-title {
  font-size: 17px;
  font-weight: 800;
  color: #1e293b;
  margin: 0 0 8px 0;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.3s ease;
  min-height: 45px;
  letter-spacing: -0.3px;
}

.product-card:hover .product-title {
  color: #2563eb;
}

/* Product Price - Inline Badge (Refined) */
.product-price {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
  padding: 6px 10px;
  background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 100%);
  border-radius: 8px;
  border: 1px solid #7dd3fc;
}

.product-price::before {
  content: '💰';
  font-size: 14px;
  line-height: 1;
}

.product-price .price {
  font-size: 18px;
  font-weight: 900;
  color: #0c4a6e;
  line-height: 1;
  letter-spacing: -0.4px;
}

.product-price .currency {
  font-size: 12px;
  font-weight: 700;
  color: #0369a1;
}

/* Product Meta */
.product-meta {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding-top: 8px;
  border-top: 2px solid #f1f5f9;
}

.product-meta span {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #64748b;
  font-weight: 600;
  padding: 0;
}

.product-meta i {
  font-size: 14px;
  color: #3b82f6;
  width: 18px;
  text-align: center;
}

/* Hover Effect on Meta */
.product-card:hover .product-meta span {
  color: #475569;
}

/* View Details Button - Always Visible */
.product-card-footer {
  padding: 10px 16px;
  background: linear-gradient(180deg, #fafbfc 0%, #f8fafc 100%);
  border-top: 2px solid #f1f5f9;
}

.btn-view-details {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 10px 14px;
  background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
  color: white;
  text-align: center;
  border-radius: 10px;
  font-weight: 700;
  font-size: 14px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
  border: 2px solid transparent;
  text-decoration: none;
  cursor: pointer;
}

.btn-view-details:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.35);
  background: #ffffff;
  color: #2563eb;
  border: 2px solid #2563eb;
}

.btn-view-details:active {
  transform: translateY(0);
}

.btn-view-details i {
  font-size: 13px;
  transition: transform 0.3s ease;
}

.btn-view-details:hover i {
  transform: translateX(4px);
}

/* Responsive Grid */
@media (max-width: 1400px) {
  .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
  }
}

@media (max-width: 1024px) {
  .products-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
  }

  .product-image {
    height: 220px;
  }
}

@media (max-width: 768px) {
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .product-image {
    height: 200px;
  }

  .product-info {
    padding: 16px;
  }

  .product-title {
    font-size: 15px;
    min-height: 40px;
  }

  .product-price .price {
    font-size: 20px;
  }

  .btn-favorite {
    width: 36px;
    height: 36px;
    font-size: 16px;
  }
}

@media (max-width: 480px) {
  .products-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .product-image {
    height: 240px;
  }

  .product-card::after {
    bottom: 16px;
    left: 16px;
    right: 16px;
  }
}

/* Loading State */
.product-card.loading {
  pointer-events: none;
  opacity: 0.6;
}

.product-card.loading .product-image {
  background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
  background-size: 200% 100%;
  animation: loading 1.5s ease-in-out infinite;
}

@keyframes loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}
