/**
 * FRO Product Listing - Premium Edition
 * Şık hover efektleri, animasyonlar ve modern tasarım
 */

/* ==========================================
   Enhanced Card Styles
   ========================================== */
.fro-product-card {
  position: relative;
  overflow: visible !important;
  background: linear-gradient(145deg, #ffffff 0%, #fafafa 100%);
  border: 1px solid rgba(0, 0, 0, 0.04);
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.fro-product-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(212, 168, 83, 0.1) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
  z-index: 0;
}

.fro-product-card:hover::before {
  opacity: 1;
}

.fro-product-card:hover {
  transform: translateY(-12px) scale(1.02);
  box-shadow: 
    0 25px 50px rgba(0, 0, 0, 0.12),
    0 10px 20px rgba(212, 168, 83, 0.08);
  border-color: rgba(212, 168, 83, 0.2);
}

/* ==========================================
   Premium Banner
   ========================================== */
.fro-scrolling-banner {
  background: linear-gradient(135deg, #1f2937 0%, #374151 100%);
  position: relative;
  overflow: hidden;
}

.fro-scrolling-banner::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
  animation: bannerShine 3s ease-in-out infinite;
}

@keyframes bannerShine {
  0% { left: -100%; }
  50%, 100% { left: 100%; }
}

.fro-banner-item i {
  animation: bannerIconPulse 2s ease-in-out infinite;
}

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

/* ==========================================
   Image Enhancements
   ========================================== */
.fro-product-image-wrapper {
  background: linear-gradient(180deg, #f8f9fa 0%, #e9ecef 100%);
  overflow: hidden;
}

.fro-product-image-wrapper::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: linear-gradient(to top, rgba(0,0,0,0.03), transparent);
  pointer-events: none;
  z-index: 1;
}

.fro-product-img {
  transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1), filter 0.5s ease;
}

.fro-product-card:hover .fro-product-img {
  transform: scale(1.1);
  filter: brightness(1.02);
}

/* Image Arrows - Premium */
.fro-image-arrow {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.fro-image-arrow:hover {
  background: linear-gradient(135deg, #d4a853 0%, #e8c77b 100%);
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 8px 25px rgba(212, 168, 83, 0.4);
}

.fro-image-arrow:active {
  transform: translateY(-50%) scale(0.95);
}

/* Image Dots - Premium */
.fro-image-dots {
  background: rgba(0, 0, 0, 0.3);
  padding: 6px 12px;
  border-radius: 20px;
  backdrop-filter: blur(5px);
}

.fro-dot {
  width: 6px;
  height: 6px;
  transition: all 0.3s ease;
}

.fro-dot.active {
  width: 20px;
  border-radius: 3px;
  background: #d4a853;
}

/* ==========================================
   Sale Badge - Premium
   ========================================== */
.fro-sale-badge {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 11px;
  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;
}

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

/* ==========================================
   Color Swatches - Premium
   ========================================== */
.fro-color-swatch {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 
    0 2px 8px rgba(0, 0, 0, 0.1),
    inset 0 1px 2px rgba(255, 255, 255, 0.5);
}

.fro-color-swatch:hover {
  transform: scale(1.25) translateY(-2px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

.fro-color-swatch.active {
  transform: scale(1.15);
  box-shadow: 0 0 0 3px rgba(212, 168, 83, 0.3);
  border-color: #d4a853 !important;
}

/* ==========================================
   Product Title - Premium
   ========================================== */
.fro-product-title {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.fro-product-title a {
  background: linear-gradient(135deg, #1f2937 0%, #374151 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  transition: all 0.3s ease;
}

.fro-product-card:hover .fro-product-title a {
  background: linear-gradient(135deg, #d4a853 0%, #c5a059 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

.fro-variant-name {
  font-size: 12px;
  color: #9ca3af;
  font-weight: 500;
  -webkit-text-fill-color: #9ca3af;
}

/* ==========================================
   Price - Premium
   ========================================== */
.fro-current-price,
.fro-current-price .amount {
  font-size: 20px !important;
  font-weight: 800 !important;
  background: linear-gradient(135deg, #1f2937 0%, #374151 100%);
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  background-clip: text !important;
}

.fro-old-price,
.fro-old-price .amount {
  font-size: 13px !important;
  color: #9ca3af !important;
  -webkit-text-fill-color: #9ca3af !important;
}

/* ==========================================
   Rating Stars - Premium
   ========================================== */
.fro-star-rating {
  filter: drop-shadow(0 1px 2px rgba(212, 168, 83, 0.3));
}

.fro-star.filled {
  color: #d4a853;
  animation: starPop 0.3s ease;
}

@keyframes starPop {
  0% { transform: scale(1); }
  50% { transform: scale(1.3); }
  100% { transform: scale(1); }
}

.fro-rating-count {
  font-size: 12px;
  color: #6b7280;
  font-weight: 500;
}

/* Buttons - see Product Action Buttons section below */

/* ==========================================
   Loading Animation
   ========================================== */
.fro-product-card.loading {
  opacity: 0;
  transform: translateY(20px);
}

.fro-product-card.loaded {
  animation: cardReveal 0.6s ease forwards;
}

@keyframes cardReveal {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Stagger animation */
.fro-product-card:nth-child(1) { animation-delay: 0.1s; }
.fro-product-card:nth-child(2) { animation-delay: 0.2s; }
.fro-product-card:nth-child(3) { animation-delay: 0.3s; }
.fro-product-card:nth-child(4) { animation-delay: 0.4s; }
.fro-product-card:nth-child(5) { animation-delay: 0.5s; }
.fro-product-card:nth-child(6) { animation-delay: 0.6s; }
.fro-product-card:nth-child(7) { animation-delay: 0.7s; }
.fro-product-card:nth-child(8) { animation-delay: 0.8s; }

/* ==========================================
   Widget Title - Premium
   ========================================== */
.fro-widget-title {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #1f2937 0%, #4b5563 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  position: relative;
  display: inline-block;
}

.fro-widget-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, #d4a853, #e8c77b);
  margin: 15px auto 0;
  border-radius: 2px;
}

/* ==========================================
   Quick View Effect
   ========================================== */
.fro-product-image-wrapper::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(0,0,0,0.6) 100%);
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: 2;
  pointer-events: none;
}

.fro-product-card:hover .fro-product-image-wrapper::before {
  opacity: 1;
}

/* ==========================================
   Product Action Buttons (Sepete Ekle, Detaylı İncele)
   ========================================== */
.fro-product-actions {
  display: flex;
  gap: 10px;
  padding: 16px;
  padding-top: 0;
  margin-top: auto;
}

.fro-product-actions .button,
.fro-product-actions .fro-add-to-cart-ajax,
.fro-product-actions .fro-view-details {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  text-align: center;
  line-height: 1.4;
}

/* Sepete Ekle Button */
.fro-product-actions .fro-add-to-cart-ajax {
  background: linear-gradient(135deg, #1f2937 0%, #374151 100%);
  color: #ffffff;
  box-shadow: 0 4px 15px rgba(31, 41, 55, 0.3);
}

.fro-product-actions .fro-add-to-cart-ajax::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 ease;
}

.fro-product-actions .fro-add-to-cart-ajax:hover::before {
  left: 100%;
}

.fro-product-actions .fro-add-to-cart-ajax:hover {
  background: linear-gradient(135deg, #d4a853 0%, #c5a059 100%);
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(212, 168, 83, 0.4);
}

/* Detaylı İncele Button */
.fro-product-actions .fro-view-details {
  background: transparent;
  color: #374151;
  border: 2px solid #e5e7eb;
}

.fro-product-actions .fro-view-details:hover {
  background: #f9fafb;
  border-color: #d4a853;
  color: #d4a853;
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

/* Loading state */
.fro-product-actions .fro-btn-loading {
  display: none;
}

.fro-product-actions .fro-add-to-cart-ajax.loading .fro-btn-text {
  display: none;
}

.fro-product-actions .fro-add-to-cart-ajax.loading .fro-btn-loading {
  display: inline-flex;
}

/* ==========================================
   Stock Status Badge
   ========================================== */
.fro-stock-badge {
  position: absolute;
  bottom: 12px;
  left: 12px;
  padding: 4px 10px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-radius: 4px;
  z-index: 3;
}

.fro-stock-badge.in-stock {
  background: rgba(34, 197, 94, 0.9);
  color: #fff;
}

.fro-stock-badge.low-stock {
  background: rgba(234, 179, 8, 0.9);
  color: #fff;
}

.fro-stock-badge.out-of-stock {
  background: rgba(239, 68, 68, 0.9);
  color: #fff;
}

/* ==========================================
   Responsive Adjustments
   ========================================== */
@media (max-width: 768px) {
  .fro-product-card:hover {
    transform: none;
  }
  
  .fro-product-card:active {
    transform: scale(0.98);
  }
  
  .fro-image-arrow {
    opacity: 1;
    width: 32px;
    height: 32px;
  }
  
  .fro-btn {
    padding: 10px 12px;
    font-size: 12px;
  }
  
  .fro-widget-title {
    font-size: 24px;
  }
}

/* ==========================================
   Reduced Motion
   ========================================== */
@media (prefers-reduced-motion: reduce) {
  .fro-product-card,
  .fro-product-img,
  .fro-btn,
  .fro-color-swatch,
  .fro-image-arrow,
  .fro-sale-badge {
    transition: none !important;
    animation: none !important;
  }
}
