/* Enhanced Product Card Hover States */

.product-card-modern {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.product-card-modern:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, .12);
}

/* Image Wrapper Enhancements */
.product-image-wrapper {
  position: relative;
  overflow: hidden;
}

.product-image {
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Enhanced Overlay Buttons */
.product-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0.3) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.product-card-modern:hover .product-overlay {
  opacity: 1;
}

.overlay-btn {
  width: 50px;
  height: 50px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  border-radius: 50%;
  border: none;
  cursor: pointer;
  transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: #334155;
  opacity: 0;
  transform: scale(0.85);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  text-decoration: none;
}

.product-card-modern:hover .overlay-btn {
  opacity: 1;
  transform: scale(1);
}

.product-card-modern:hover .overlay-btn:nth-child(1) {
  transition-delay: 0.1s;
}

.product-card-modern:hover .overlay-btn:nth-child(2) {
  transition-delay: 0.15s;
}

.product-card-modern:hover .overlay-btn:nth-child(3) {
  transition-delay: 0.2s;
}

.overlay-btn:hover {
  background: #2563eb;
  color: white;
  transform: scale(1.15) translateY(0);
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.4);
}

.favorite-btn.active {
  background: #ef4444;
  color: white;
}

.favorite-btn:hover {
  background: #ef4444;
  color: white;
}

/* Badge Enhancements */
.product-badges {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 2;
}

.product-badges span {
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  backdrop-filter: blur(10px);
  animation: badgePulse 2s ease-in-out infinite;
}

@keyframes badgePulse {

  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.05);
  }
}

.badge-new {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  font-weight: 700;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
  animation: badgePulse 2s ease-in-out infinite;
}

.badge-featured {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: white;
  font-weight: 700;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
  animation: badgePulse 2s ease-in-out infinite;
}

.badge-hot {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: white;
  font-weight: 700;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
  animation: badgePulse 2s ease-in-out infinite;
}

.badge-verified {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: white;
  font-weight: 700;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
  animation: badgePulse 2s ease-in-out infinite;
}

/* Product Content Enhancements */
.product-content {
  padding: 20px;
  position: relative;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.product-category {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  color: #2563eb;
  background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
  padding: 6px 12px;
  border-radius: 20px;
  font-weight: 600;
  margin-bottom: 12px;
  transition: all 0.3s ease;
  border: 1px solid #93c5fd;
}

.product-category i {
  font-size: 0.85rem;
}

.product-card-modern:hover .product-category {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: white;
  border-color: #1e40af;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(37, 99, 235, 0.3);
}

.product-title {
  color: #0f172a;
  transition: color 0.3s ease;
}

.product-title a {
  color: #1e293b;
  text-decoration: none;
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.5;
  display: block;
  transition: all 0.3s ease;
}

.product-card-modern:hover .product-title a {
  color: #2563eb;
  transform: translateX(4px);
}

/* Rating Enhancement */
.product-rating {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

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

.product-rating .stars i {
  color: #fbbf24;
  font-size: 14px;
  transition: transform 0.3s ease;
}

.product-card-modern:hover .product-rating .stars i {
  transform: scale(1.1);
}

.rating-count {
  font-size: 12px;
  color: #64748b;
  font-weight: 600;
}

/* Meta Information */
.product-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.875rem;
  color: #64748b;
  margin-bottom: 16px;
  padding: 12px 0;
  border-top: 1px solid #f1f5f9;
  border-bottom: 1px solid #f1f5f9;
}

.product-meta .meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.3s ease;
}

.product-meta .meta-item i {
  color: #2563eb;
  font-size: 0.9rem;
}

.product-card-modern:hover .product-meta .meta-item {
  color: #475569;
  transform: translateX(2px);
}

.product-meta .meta-divider {
  color: #cbd5e1;
  font-weight: 300;
}

/* Product Features */
.product-features {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
  padding: 12px 0;
  border-top: 1px solid #e2e8f0;
}

.product-features .feature {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  background: #f8fafc;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
  transition: all 0.3s ease;
}

.product-card-modern:hover .product-features .feature {
  background: #eff6ff;
  color: #2563eb;
}

.product-features .feature i {
  color: #2563eb;
}

/* Footer Enhancements */
.product-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 12px;
  border-top: 1px solid #e2e8f0;
  margin-top: auto;
}

.product-price {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.price-current {
  font-size: 24px;
  font-weight: 900;
  background: linear-gradient(135deg, #2563eb 0%, #06b6d4 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  transition: font-size 0.3s ease;
  display: flex !important;
  align-items: baseline !important;
  gap: 4px !important;
}

.price-currency-small {
  font-size: 0.55em;
  font-weight: 700;
  color: #64748b !important;
  -webkit-text-fill-color: #64748b !important;
  background: none !important;
  -webkit-background-clip: initial !important;
  background-clip: initial !important;
}

.price-current.price-md {
  font-size: 20px;
}

.price-current.price-sm {
  font-size: 18px;
}

.price-current.price-xs {
  font-size: 15px;
}

.price-current.price-xxs {
  font-size: 12px;
}

.price-old {
  font-size: 14px;
  color: #94a3b8;
  text-decoration: line-through;
  font-weight: 600;
}

.price-currency {
  font-size: 14px;
  color: #64748b;
  font-weight: 600;
}

.btn-contact {
  padding: 10px 20px;
  background: linear-gradient(135deg, #2563eb 0%, #06b6d4 100%);
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 700;
  font-family: 'Cairo', sans-serif;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.btn-contact:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(37, 99, 235, .25);
}

.btn-contact i {
  animation: phonePulse 1.5s ease-in-out infinite;
}

@keyframes phonePulse {

  0%,
  100% {
    transform: rotate(0deg);
  }

  25% {
    transform: rotate(-15deg);
  }

  75% {
    transform: rotate(15deg);
  }
}

/* Quick View Tooltip */
.product-card-modern::after {
  content: 'معاينة سريعة';
  position: absolute;
  bottom: -40px;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: #0f172a;
  color: white;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease;
  z-index: 100;
}

.product-card-modern:hover::after {
  opacity: 0.9;
  transform: translateX(-50%) translateY(0);
}

/* View Count Badge */
.view-count {
  position: absolute;
  bottom: 12px;
  left: 12px;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(10px);
  color: white;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
  z-index: 2;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.product-card-modern:hover .view-count {
  opacity: 1;
}

.view-count i {
  color: #06b6d4;
}

/* Seller Badge */
.seller-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  padding: 6px 10px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 4px;
  color: #10b981;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .1);
  z-index: 2;
  transition: all 0.3s ease;
  opacity: 0;
}

.product-card-modern:hover .seller-badge {
  opacity: 1;
  transform: translateY(0);
}

.seller-badge i {
  font-size: 12px;
}

/* Negotiable Tag */
.negotiable-tag {
  position: absolute;
  top: 60px;
  right: 12px;
  background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%);
  color: white;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 10px;
  font-weight: 800;
  z-index: 2;
  animation: shimmer 2s ease-in-out infinite;
}

@keyframes shimmer {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.7;
  }
}

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

.product-card-modern.loading::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
  animation: shimmerLoading 1.5s ease-in-out infinite;
  z-index: 10;
}

@keyframes shimmerLoading {
  0% {
    transform: translateX(-100%);
  }

  100% {
    transform: translateX(100%);
  }
}

/* Responsive */
@media (max-width: 768px) {
  .product-card-modern:hover {
    transform: translateY(-4px);
  }

  .overlay-btn {
    width: 36px;
    height: 36px;
    font-size: 14px;
  }

  .btn-contact {
    padding: 8px 14px;
    font-size: 13px;
  }

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

  .product-card-modern::after {
    display: none;
  }
}