/* ================================================
   PREMIUM PRODUCT CARD DESIGN
   BINOX - Premium International Marketplace
   Advanced product cards with badges, ratings, animations
   ================================================ */

/* ===== PRODUCT CARD CONTAINER ===== */
.product-card-premium {
  position: relative;
  background: var(--surface-0);
  border: 1px solid var(--ink-200);
  border-radius: var(--radius-2xl);
  overflow: hidden;
  transition: all var(--transition-premium);
  cursor: pointer;
  display: flex;
  flex-direction: column;
}

.product-card-premium:hover {
  border-color: var(--brand-accent);
  box-shadow: var(--shadow-2xl);
  transform: translateY(-8px) scale(1.02);
}

/* ===== PRODUCT IMAGE STAGE ===== */
.product-image-stage {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--surface-100);
}

.product-image-stage img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-premium);
}

.product-card-premium:hover .product-image-stage img {
  transform: scale(1.1) rotate(2deg);
}

/* ===== PRODUCT BADGES ===== */
.product-badges {
  position: absolute;
  top: var(--space-3);
  left: var(--space-3);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  z-index: 2;
}

.product-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-1) var(--space-3);
  font-size: var(--text-xs);
  font-weight: var(--font-bold);
  border-radius: var(--radius-full);
  backdrop-filter: blur(8px);
  animation: badgePulse 2s ease-in-out infinite;
}

@keyframes badgePulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

.product-badge-hot {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: white;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

.product-badge-new {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

.product-badge-sale {
  background: linear-gradient(135deg, #f97316, #ea580c);
  color: white;
  box-shadow: 0 4px 12px rgba(249, 115, 22, 0.4);
}

.product-badge-best-seller {
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
  color: white;
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.4);
}

.product-badge-trending {
  background: linear-gradient(135deg, #ec4899, #db2777);
  color: white;
  box-shadow: 0 4px 12px rgba(236, 72, 153, 0.4);
}

.product-badge-limited {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: white;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
}

.product-badge-verified {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: white;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.product-badge-stock {
  background: rgba(15, 23, 42, 0.9);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* ===== QUICK ACTIONS ===== */
.product-quick-actions {
  position: absolute;
  top: var(--space-3);
  right: var(--space-3);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  opacity: 0;
  transform: translateX(20px);
  transition: all var(--transition-premium);
  z-index: 2;
}

.product-card-premium:hover .product-quick-actions {
  opacity: 1;
  transform: translateX(0);
}

.quick-action-btn {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  background: var(--surface-0);
  border: 1px solid var(--ink-200);
  border-radius: var(--radius-full);
  color: var(--ink-600);
  cursor: pointer;
  transition: all var(--transition-base);
  box-shadow: var(--shadow-md);
}

.quick-action-btn:hover {
  background: var(--brand-accent);
  border-color: var(--brand-accent);
  color: white;
  transform: scale(1.1);
}

.quick-action-btn svg {
  width: 18px;
  height: 18px;
}

.quick-action-btn.wishlisted {
  background: #ef4444;
  border-color: #ef4444;
  color: white;
}

/* ===== PRODUCT INFO ===== */
.product-info {
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  flex: 1;
}

/* ===== PRODUCT CATEGORY ===== */
.product-category {
  font-size: var(--text-xs);
  font-weight: var(--font-medium);
  color: var(--ink-500);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ===== PRODUCT TITLE ===== */
.product-title {
  font-family: var(--font-heading);
  font-size: var(--text-base);
  font-weight: var(--font-semibold);
  color: var(--ink-900);
  line-height: var(--leading-tight);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color var(--transition-base);
}

.product-card-premium:hover .product-title {
  color: var(--brand-accent);
}

/* ===== PRODUCT RATING ===== */
.product-rating {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.rating-stars {
  display: flex;
  gap: 2px;
}

.rating-star {
  width: 14px;
  height: 14px;
  fill: #fbbf24;
  stroke: #fbbf24;
}

.rating-star.empty {
  fill: var(--ink-200);
  stroke: var(--ink-200);
}

.rating-count {
  font-size: var(--text-xs);
  color: var(--ink-500);
}

/* ===== PRODUCT PRICE ===== */
.product-price {
  display: flex;
  align-items: baseline;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.price-current {
  font-family: var(--font-heading);
  font-size: var(--text-lg);
  font-weight: var(--font-extrabold);
  color: var(--brand-accent);
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.price-original {
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  color: var(--ink-400);
  text-decoration: line-through;
}

.price-discount {
  font-size: var(--text-xs);
  font-weight: var(--font-bold);
  color: var(--brand-success);
  background: rgba(16, 185, 129, 0.1);
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-full);
}

/* ===== PRODUCT STOCK ===== */
.product-stock {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  font-weight: var(--font-medium);
}

.stock-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  animation: stockPulse 2s ease-in-out infinite;
}

@keyframes stockPulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.stock-high {
  background: var(--brand-success);
  color: var(--brand-success);
}

.stock-medium {
  background: var(--brand-warning);
  color: var(--brand-warning);
}

.stock-low {
  background: var(--brand-error);
  color: var(--brand-error);
}

.stock-out {
  background: var(--ink-400);
  color: var(--ink-400);
}

/* ===== PRODUCT SHIPPING ===== */
.product-shipping {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  color: var(--ink-500);
  padding: var(--space-2);
  background: var(--surface-50);
  border-radius: var(--radius-md);
}

.product-shipping svg {
  width: 14px;
  height: 14px;
  color: var(--brand-success);
}

/* ===== PRODUCT ACTIONS ===== */
.product-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2);
  margin-top: auto;
  padding-top: var(--space-3);
  border-top: 1px solid var(--ink-100);
}

.product-action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3);
  font-family: var(--font-heading);
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  border-radius: var(--radius-lg);
  transition: all var(--transition-base);
  cursor: pointer;
  border: none;
}

.product-action-btn.primary {
  background: var(--gradient-primary);
  color: white;
  box-shadow: var(--shadow-premium);
}

.product-action-btn.primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

.product-action-btn.secondary {
  background: var(--surface-100);
  color: var(--ink-700);
  border: 1px solid var(--ink-200);
}

.product-action-btn.secondary:hover {
  background: var(--surface-200);
  border-color: var(--ink-300);
}

.product-action-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

.product-action-btn svg {
  width: 16px;
  height: 16px;
}

/* ===== PRODUCT CARD VARIANTS ===== */

/* Compact Card */
.product-card-compact {
  padding: var(--space-3);
}

.product-card-compact .product-image-stage {
  aspect-ratio: 4/3;
}

.product-card-compact .product-info {
  padding: var(--space-3) 0 0;
}

/* Minimal Card */
.product-card-minimal {
  border: none;
  border-radius: var(--radius-xl);
  background: transparent;
}

.product-card-minimal .product-image-stage {
  border-radius: var(--radius-xl);
  border: 1px solid var(--ink-200);
}

.product-card-minimal .product-badges {
  top: var(--space-2);
  left: var(--space-2);
}

.product-card-minimal .product-info {
  padding: var(--space-3) 0;
}

/* Featured Card */
.product-card-featured {
  background: linear-gradient(135deg, #ffffff 0%, #fef3c7 100%);
  border: 2px solid var(--brand-accent);
}

.product-card-featured::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-primary);
}

/* ===== SKELETON LOADING ===== */
.product-card-skeleton {
  pointer-events: none;
}

.product-card-skeleton .product-image-stage {
  background: linear-gradient(
    90deg,
    var(--surface-200) 0%,
    var(--surface-100) 50%,
    var(--surface-200) 100%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

.product-card-skeleton .product-title,
.product-card-skeleton .product-price,
.product-card-skeleton .product-rating {
  background: linear-gradient(
    90deg,
    var(--surface-200) 0%,
    var(--surface-100) 50%,
    var(--surface-200) 100%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  height: 1em;
  border-radius: var(--radius-sm);
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
  .product-quick-actions {
    opacity: 1;
    transform: translateX(0);
  }
  
  .product-actions {
    grid-template-columns: 1fr;
  }
  
  .product-action-btn {
    padding: var(--space-4);
  }
}

@media (max-width: 480px) {
  .product-info {
    padding: var(--space-3);
  }
  
  .product-title {
    font-size: var(--text-sm);
  }
  
  .price-current {
    font-size: var(--text-base);
  }
}

/* ===== ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {
  .product-card-premium,
  .product-image-stage img,
  .product-quick-actions,
  .quick-action-btn,
  .product-badge,
  .stock-indicator {
    transition: none;
    animation: none;
  }
}

.product-card-premium:focus-visible {
  outline: 2px solid var(--brand-accent);
  outline-offset: 4px;
}

.quick-action-btn:focus-visible,
.product-action-btn:focus-visible {
  outline: 2px solid var(--brand-accent);
  outline-offset: 2px;
}

/* ===== HOVER EFFECTS ===== */
.product-card-premium::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(249, 115, 22, 0.1), transparent 50%);
  opacity: 0;
  transition: opacity var(--transition-base);
  pointer-events: none;
  border-radius: inherit;
}

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