/* Enhanced Product Cards - Best Design */

/* Product Card Container */
.product-card {
  position: relative;
  background: white;
  border-radius: 20px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.product-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
  border-color: var(--sqube-red);
}

/* Product Image Container */
.product-image-container {
  position: relative;
  overflow: hidden;
  height: 280px;
  background: var(--primary);
}

.product-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.product-card:hover .product-image {
  transform: scale(1.05);
}

/* Product Badges */
.product-badges {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.product-badge {
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.badge-organic {
  background: var(--primary);
  color: white;
}

.badge-sale {
  background: var(--primary);
  color: white;
}

.badge-new {
  background: var(--primary);
  color: white;
}

.badge-premium {
  background: var(--primary);
  color: white;
}

/* Product Actions */
.product-actions {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 8px;
  opacity: 0;
  transform: translateX(20px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.product-card:hover .product-actions {
  opacity: 1;
  transform: translateX(0);
}

.action-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.action-btn:hover {
  background: var(--sqube-red);
  color: white;
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(138, 0, 0, 0.3);
}

.action-btn.wishlist.active {
  background: var(--sqube-red);
  color: white;
}

/* Quick View Overlay */
.quick-view-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--primary);
  padding: 20px;
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.product-card:hover .quick-view-overlay {
  transform: translateY(0);
}

.quick-view-btn {
  width: 100%;
  background: white;
  color: var(--sqube-red);
  border: 2px solid var(--sqube-red);
  padding: 12px 20px;
  border-radius: 25px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.quick-view-btn:hover {
  background: var(--sqube-red);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(138, 0, 0, 0.3);
}

/* Product Content */
.product-content {
  padding: 24px;
  position: relative;
}

.product-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--sqube-brown);
  margin-bottom: 8px;
  line-height: 1.3;
  transition: color 0.3s ease;
}

.product-card:hover .product-title {
  color: var(--sqube-red);
}

.product-description {
  color: #6b7280;
  font-size: 14px;
  line-height: 1.5;
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Product Rating */
.product-rating {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}

.rating-stars {
  display: flex;
  gap: 2px;
}

.rating-stars .star {
  width: 16px;
  height: 16px;
  color: #fbbf24;
  transition: color 0.2s ease;
}

.rating-stars .star:hover {
  color: #f59e0b;
}

.rating-text {
  font-size: 13px;
  color: #6b7280;
  font-weight: 500;
}

.rating-count {
  font-size: 12px;
  color: #9ca3af;
}

/* Product Price */
.product-price-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.product-price {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.current-price {
  font-size: 24px;
  font-weight: 800;
  color: var(--sqube-red);
  line-height: 1;
}

.original-price {
  font-size: 16px;
  color: #9ca3af;
  text-decoration: line-through;
  font-weight: 500;
}

.discount-percentage {
  background: var(--primary);
  color: white;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Product Features */
.product-features {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.feature-tag {
  background: #f3f4f6;
  color: #374151;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 500;
  border: 1px solid #e5e7eb;
}

/* Add to Cart Button */
.add-to-cart-btn {
  width: 100%;
  background: var(--primary);
  color: white;
  border: none;
  padding: 14px 20px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  position: relative;
  overflow: hidden;
}

.add-to-cart-btn::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;
}

.add-to-cart-btn:hover::before {
  left: 100%;
}

.add-to-cart-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(138, 0, 0, 0.4);
}

.add-to-cart-btn:active {
  transform: translateY(0);
}

.add-to-cart-btn.loading {
  pointer-events: none;
  opacity: 0.7;
}

.add-to-cart-btn.loading::after {
  content: "";
  width: 16px;
  height: 16px;
  border: 2px solid transparent;
  border-top: 2px solid white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Product Stock Status */
.stock-status {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
  font-size: 13px;
  font-weight: 500;
}

.stock-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  animation: pulse 2s infinite;
}

.stock-in {
  background: var(--sqube-green);
  color: var(--sqube-green);
}

.stock-low {
  background: #f59e0b;
  color: #f59e0b;
}

.stock-out {
  background: #ef4444;
  color: #ef4444;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

/* Product Comparison */
.comparison-checkbox {
  position: absolute;
  top: 12px;
  left: 12px;
  width: 20px;
  height: 20px;
  border-radius: 4px;
  border: 2px solid #d1d5db;
  background: white;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 15;
}

.comparison-checkbox:checked {
  background: var(--sqube-red);
  border-color: var(--sqube-red);
}

.comparison-checkbox:checked::after {
  content: "✓";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 12px;
  font-weight: bold;
}

/* Responsive Design */
@media (max-width: 768px) {
  .product-image-container {
    height: 240px;
  }

  .product-content {
    padding: 20px;
  }

  .product-title {
    font-size: 16px;
  }

  .current-price {
    font-size: 20px;
  }

  .product-actions {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
  .product-card {
    background: #1f2937;
    border-color: #374151;
  }

  .product-title {
    color: #f9fafb;
  }

  .product-description {
    color: #d1d5db;
  }

  .action-btn {
    background: rgba(31, 41, 55, 0.95);
    border-color: rgba(75, 85, 99, 0.3);
  }
}

/* Print Styles */
@media print {
  .product-actions,
  .quick-view-overlay,
  .add-to-cart-btn {
    display: none;
  }

  .product-card {
    box-shadow: none;
    border: 1px solid #000;
  }
}
