/* WooCommerce Products Widget Styles - Exact Figma Match */
:root {
  --slidefire-primary: #23B2EE;
  --slidefire-background: #000000;
  --slidefire-foreground: #ffffff;
  --slidefire-card: #111111;
  --slidefire-card-foreground: #ffffff;
  --slidefire-border: #333333;
  --slidefire-muted: #222222;
  --slidefire-muted-foreground: #888888;
  --slidefire-radius: 0.75rem;
  --spacing: 0.25rem;
}

/* Products Grid Container - Exact Figma Match: grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-6 */
.slidefirePro-products-wrapper {
  width: 100%;
  background-color: var(--slidefire-background);
}

.slidefirePro-products-wrapper .slidefirePro-products-grid {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: calc(var(--spacing) * 6); /* gap-6 = 1.5rem */
}

/* Responsive Grid Columns - Exact Figma breakpoints */
@media (min-width: 640px) {
  .slidefirePro-products-wrapper .slidefirePro-products-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)); /* sm:grid-cols-2 */
  }
}

@media (min-width: 1024px) {
  .slidefirePro-products-wrapper .slidefirePro-products-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)); /* lg:grid-cols-3 */
  }
}

@media (min-width: 1280px) {
  .slidefirePro-products-wrapper .slidefirePro-products-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr)); /* xl:grid-cols-4 */
  }
}

/* Product Card - Exact Figma: text-card-foreground flex flex-col gap-6 rounded-xl border group bg-card border-border hover:border-primary/50 transition-all duration-300 overflow-hidden cursor-pointer */
.slidefirePro-products-wrapper .product-card {
  color: var(--slidefire-card-foreground); /* text-card-foreground */
  display: flex; /* flex */
  flex-direction: column; /* flex-col */
  gap: calc(var(--spacing) * 6); /* gap-6 */
  border-radius: var(--slidefire-radius); /* rounded-xl */
  border: 1px solid var(--slidefire-border); /* border border-border */
  background-color: var(--slidefire-card); /* bg-card */
  transition: all 300ms ease; /* transition-all duration-300 */
  overflow: hidden; /* overflow-hidden */
  cursor: pointer; /* cursor-pointer */
  padding: 0; /* Remove default padding */
}

/* Group hover effects - hover:border-primary/50 */
.slidefirePro-products-wrapper .product-card:hover {
  border-color: rgba(35, 178, 238, 0.5); /* hover:border-primary/50 */
}

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

/* Product Image - Exact Figma: w-full h-64 object-cover group-hover:scale-105 transition-transform duration-500 */
.slidefirePro-products-wrapper .product-image {
  width: 100%; /* w-full */
  height: calc(var(--spacing) * 64); /* h-64 = 16rem */
  object-fit: cover; /* object-cover */
  transition: transform 500ms ease; /* transition-transform duration-500 */
}

/* Group hover scale effect - group-hover:scale-105 */
.slidefirePro-products-wrapper .product-card:hover .product-image {
  transform: scale(1.05); /* group-hover:scale-105 */
}

/* Product Badges - Exact Figma badge structure */
.slidefirePro-products-wrapper .product-badge {
  /* inline-flex items-center justify-center rounded-md border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.375rem; /* rounded-md */
  border: 1px solid transparent;
  padding: calc(var(--spacing) * 0.5) calc(var(--spacing) * 2); /* py-0.5 px-2 */
  font-size: 0.75rem; /* text-xs */
  font-weight: 500; /* font-medium */
  width: fit-content; /* w-fit */
  white-space: nowrap; /* whitespace-nowrap */
  position: absolute;
  top: calc(var(--spacing) * 3); /* top-3 */
  transition: all 300ms ease;
}

/* Sale Badge - Exact Figma: bg-primary text-white absolute top-3 left-3 */
.slidefirePro-products-wrapper .sale-badge {
  left: calc(var(--spacing) * 3); /* left-3 */
  background-color: var(--slidefire-primary); /* bg-primary */
  color: white; /* text-white */
  border-color: transparent;
}

/* Wishlist Button - Exact Figma positioned button */
.slidefirePro-products-wrapper .wishlist-button {
  /* inline-flex items-center justify-center whitespace-nowrap text-sm font-medium disabled:pointer-events-none disabled:opacity-50 */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  font-size: 0.875rem; /* text-sm */
  font-weight: 500; /* font-medium */
  /* absolute top-3 right-3 h-8 w-8 p-0 bg-background/80 hover:bg-background opacity-0 group-hover:opacity-100 transition-opacity */
  position: absolute;
  top: calc(var(--spacing) * 3); /* top-3 */
  right: calc(var(--spacing) * 3); /* right-3 */
  height: calc(var(--spacing) * 8); /* h-8 */
  width: calc(var(--spacing) * 8); /* w-8 */
  padding: 0; /* p-0 */
  background-color: rgba(0, 0, 0, 0.8); /* bg-background/80 */
  border-radius: 0.375rem; /* rounded-md */
  border: none;
  cursor: pointer;
  opacity: 0; /* opacity-0 */
  transition: opacity 300ms ease; /* transition-opacity */
  color: var(--slidefire-foreground);
}

.slidefirePro-products-wrapper .wishlist-button:hover {
  background-color: var(--slidefire-background); /* hover:bg-background */
}

/* Group hover opacity - group-hover:opacity-100 */
.slidefirePro-products-wrapper .product-card:hover .wishlist-button {
  opacity: 1; /* group-hover:opacity-100 */
}

/* Product Overlay - Exact Figma: absolute inset-0 bg-black/60 opacity-0 group-hover:opacity-100 transition-opacity duration-300 flex items-center justify-center */
.slidefirePro-products-wrapper .product-overlay {
  position: absolute; /* absolute */
  top: 0; /* inset-0 */
  right: 0;
  bottom: 0;
  left: 0;
  background-color: rgba(0, 0, 0, 0.6); /* bg-black/60 */
  opacity: 0; /* opacity-0 */
  display: flex; /* flex */
  align-items: center; /* items-center */
  justify-content: center; /* justify-center */
  transition: opacity 300ms ease; /* transition-opacity duration-300 */
  pointer-events: none;
}

/* Group hover overlay - group-hover:opacity-100 */
.slidefirePro-products-wrapper .product-card:hover .product-overlay {
  opacity: 1; /* group-hover:opacity-100 */
}

.slidefirePro-products-wrapper .product-overlay .quick-add-button {
  pointer-events: auto;
}

/* Quick Add Button - Exact Figma button structure */
.slidefirePro-products-wrapper .quick-add-button {
  /* inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: calc(var(--spacing) * 2); /* gap-2 */
  white-space: nowrap;
  border-radius: 0.375rem; /* rounded-md */
  font-size: 0.875rem; /* text-sm */
  font-weight: 500; /* font-medium */
  transition: all 300ms ease; /* transition-all */
  /* h-9 px-4 py-2 bg-primary hover:bg-primary/90 text-primary-foreground */
  height: calc(var(--spacing) * 9); /* h-9 */
  padding: calc(var(--spacing) * 2) calc(var(--spacing) * 4); /* px-4 py-2 */
  background-color: var(--slidefire-primary); /* bg-primary */
  color: var(--slidefire-background); /* text-primary-foreground */
  border: none;
  cursor: pointer;
}

.slidefirePro-products-wrapper .quick-add-button:hover {
  background-color: rgba(35, 178, 238, 0.9); /* hover:bg-primary/90 */
}

/* Product Content Area - Exact Figma: p-4 */
.slidefirePro-products-wrapper .product-content {
  padding: calc(var(--spacing) * 4); /* p-4 = 1rem */
}

/* Category Badge Wrapper - mb-2 */
.slidefirePro-products-wrapper .product-category-wrapper {
  margin-bottom: calc(var(--spacing) * 2); /* mb-2 */
}

/* Category Badge - Exact Figma structure */
.slidefirePro-products-wrapper .category-badge {
  /* inline-flex items-center justify-center rounded-md border px-2 py-0.5 font-medium w-fit whitespace-nowrap text-xs mb-2 */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.375rem; /* rounded-md */
  border: 1px solid var(--slidefire-border);
  padding: calc(var(--spacing) * 0.5) calc(var(--spacing) * 2); /* py-0.5 px-2 */
  font-weight: 500; /* font-medium */
  width: fit-content; /* w-fit */
  white-space: nowrap; /* whitespace-nowrap */
  font-size: 0.75rem; /* text-xs */
  color: var(--slidefire-foreground); /* text-foreground */
  background-color: transparent;
  transition: all 300ms ease;
}

.slidefirePro-products-wrapper .category-badge:hover {
  background-color: rgba(35, 178, 238, 0.1); /* hover:bg-accent */
  color: var(--slidefire-primary); /* hover:text-accent-foreground */
}

/* Product Title - Exact Figma: font-semibold mb-2 group-hover:text-primary transition-colors text-sm */
.slidefirePro-products-wrapper .product-title {
  font-weight: 600; /* font-semibold */
  margin-bottom: calc(var(--spacing) * 2); /* mb-2 */
  font-size: 0.875rem; /* text-sm */
  transition: color 300ms ease; /* transition-colors */
  line-height: 1.4;
}

.slidefirePro-products-wrapper .product-title a {
  color: var(--slidefire-card-foreground);
  text-decoration: none;
  transition: color 300ms ease;
}

/* Group hover title color - group-hover:text-primary */
.slidefirePro-products-wrapper .product-card:hover .product-title a {
  color: var(--slidefire-primary); /* group-hover:text-primary */
}

/* Product Price Wrapper - Exact Figma: flex items-center space-x-2 */
.slidefirePro-products-wrapper .product-price-wrapper {
  display: flex; /* flex */
  align-items: center; /* items-center */
  gap: calc(var(--spacing) * 2); /* space-x-2 */
  flex-wrap: wrap;
}

/* Price Styling - Exact Figma: text-lg font-bold text-primary */
.slidefirePro-products-wrapper .product-price-wrapper .price {
  color: var(--slidefire-primary); /* text-primary */
  font-weight: 700; /* font-bold */
  font-size: 1.125rem; /* text-lg */
}

/* Regular Price Styling */
.slidefirePro-products-wrapper .product-price-wrapper .price .woocommerce-Price-amount {
  color: var(--slidefire-primary);
}

/* Sale Price Structure - text-sm text-muted-foreground line-through */
.slidefirePro-products-wrapper .product-price-wrapper .price del {
  color: var(--slidefire-muted-foreground); /* text-muted-foreground */
  font-size: 0.875rem; /* text-sm */
  text-decoration: line-through; /* line-through */
  font-weight: normal;
  margin-right: calc(var(--spacing) * 2);
}

/* Sale Percentage Badge - Exact Figma structure */
.slidefirePro-products-wrapper .sale-percentage-badge {
  /* inline-flex items-center justify-center rounded-md border px-2 py-0.5 font-medium w-fit whitespace-nowrap text-xs border-primary text-primary */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.375rem; /* rounded-md */
  border: 1px solid var(--slidefire-primary); /* border-primary */
  padding: calc(var(--spacing) * 0.5) calc(var(--spacing) * 2); /* py-0.5 px-2 */
  font-weight: 500; /* font-medium */
  width: fit-content; /* w-fit */
  white-space: nowrap; /* whitespace-nowrap */
  font-size: 0.75rem; /* text-xs */
  color: var(--slidefire-primary); /* text-primary */
  background-color: transparent;
}

/* Load More Button */
.slidefirePro-products-wrapper .load-more-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: calc(var(--spacing) * 2);
  white-space: nowrap;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 300ms ease;
  border: 1px solid var(--slidefire-primary);
  background-color: var(--slidefire-background);
  color: var(--slidefire-primary);
  height: calc(var(--spacing) * 10);
  border-radius: 0.375rem;
  padding: 0 calc(var(--spacing) * 6);
  cursor: pointer;
}

.slidefirePro-products-wrapper .load-more-button:hover {
  background-color: rgba(35, 178, 238, 0.1);
}

.slidefirePro-products-wrapper .load-more-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* No Products Message */
.slidefirePro-products-wrapper .slidefirePro-no-products {
  text-align: center;
  padding: calc(var(--spacing) * 8);
  color: var(--slidefire-muted-foreground);
  font-size: 1.125rem;
}

/* Loading State */
.slidefirePro-products-wrapper.loading {
  opacity: 0.7;
  pointer-events: none;
  position: relative;
}

.slidefirePro-products-wrapper.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: calc(var(--spacing) * 8);
  height: calc(var(--spacing) * 8);
  border: 2px solid var(--slidefire-border);
  border-top-color: var(--slidefire-primary);
  border-radius: 50%;
  animation: slidefire-spin 1s linear infinite;
  transform: translate(-50%, -50%);
}

@keyframes slidefire-spin {
  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

/* Responsive Design - Fine-tune for mobile */
@media (max-width: 639px) {
  .slidefirePro-products-wrapper .slidefirePro-products-grid {
    gap: calc(var(--spacing) * 4); /* Smaller gap on mobile */
  }
  
  .slidefirePro-products-wrapper .product-image {
    height: calc(var(--spacing) * 48); /* h-48 on mobile */
  }
  
  .slidefirePro-products-wrapper .product-content {
    padding: calc(var(--spacing) * 3); /* Smaller padding */
  }
}

/* Tablet Design */
@media (min-width: 640px) and (max-width: 1023px) {
  .slidefirePro-products-wrapper .product-image {
    height: calc(var(--spacing) * 56); /* h-56 on tablet */
  }
}

/* Desktop - maintain h-64 */
@media (min-width: 1024px) {
  .slidefirePro-products-wrapper .product-image {
    height: calc(var(--spacing) * 64); /* h-64 */
  }
}

/* Icon Styles */
.slidefirePro-products-wrapper .heart-icon,
.slidefirePro-products-wrapper .cart-icon {
  width: 1rem;
  height: 1rem;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.slidefirePro-products-wrapper .quick-add-button .cart-icon {
  margin-right: calc(var(--spacing) * 2);
}

/* Utility Classes */
.slidefirePro-products-wrapper .text-center {
  text-align: center;
}

.slidefirePro-products-wrapper .mt-12 {
  margin-top: calc(var(--spacing) * 12);
}

/* Focus States for Accessibility */
.slidefirePro-products-wrapper .wishlist-button:focus,
.slidefirePro-products-wrapper .quick-add-button:focus,
.slidefirePro-products-wrapper .load-more-button:focus {
  outline: 2px solid var(--slidefire-primary);
  outline-offset: 2px;
}

/* Animation Classes */
.slidefirePro-products-wrapper .transition-all {
  transition: all 300ms ease;
}

.slidefirePro-products-wrapper .transition-transform {
  transition: transform 500ms ease;
}

.slidefirePro-products-wrapper .transition-opacity {
  transition: opacity 300ms ease;
}

.slidefirePro-products-wrapper .animate-spin {
  animation: slidefire-spin 1s linear infinite;
}

.slidefirePro-products-wrapper .animate-pulse {
  animation: slidefire-pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes slidefire-pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: .5;
  }
}

/* Additional styling for wishlist active state */
.slidefirePro-products-wrapper .wishlist-button.active {
  color: #ef4444; /* red-500 */
}

.slidefirePro-products-wrapper .wishlist-button.active .heart-icon {
  fill: currentColor;
}

/* No products message styling */
.slidefirePro-products-wrapper .no-products-message {
  grid-column: 1 / -1; /* span full width */
  text-align: center;
  padding: calc(var(--spacing) * 12);
  color: var(--slidefire-muted-foreground);
  font-size: 1.125rem;
}