Woocommerce Product Modern Hover Effect

Code ( Green Combination)

				
					@keyframes gradient-border-spin {
  0% {
    background-position: 0% 50%;
  }
  25% {
    background-position: 50% 100%;
  }
  50% {
    background-position: 100% 50%;
  }
  75% {
    background-position: 50% 0%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.products .product {
  transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1),
              box-shadow 0.4s cubic-bezier(0.25, 1, 0.5, 1);
  will-change: transform, box-shadow;
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  background-color: #ffffff;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.04);
}

.products .product::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  border-radius: 12px;
  background: conic-gradient(from var(--angle) at 50% 50%, #159758, #33cc77, #7FFF00, #159758);
  background-size: 200% 200%;
  opacity: 0;
  transition: opacity 0.4s cubic-bezier(0.25, 1, 0.5, 1);
  pointer-events: none;
  z-index: 0;
  --angle: 0deg;
}

.products .product::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 1px;
  right: 1px;
  bottom: 2px;
  background-color: #ffffff;
  border-radius: 9px;
  z-index: 1;
  pointer-events: none;
}

.products .product:hover {
  transform: translateY(-8px);
  box-shadow: 0 10px 20px rgba(21, 151, 88, 0.1),
              0 20px 40px rgba(0, 0, 0, 0.1);
}

.products .product:hover::before {
  opacity: 1;
  animation: gradient-border-spin 4s linear infinite;
  --angle: 360deg;
}

.products .product > * {
  position: relative;
  z-index: 2;
}
				
			

Code ( Green & Yellow Combination)

				
					.products .product {
  transition: transform 0.4s ease-out,
              box-shadow 0.4s ease-out;
  will-change: transform, box-shadow;
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  background-color: #ffffff;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.products .product::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 2px;
  border-radius: 8px;
  background: linear-gradient(45deg, #FFC300, #FF5733);
  -webkit-mask:
     linear-gradient(#fff 0 0) content-box,
     linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  transition: background 0.4s ease-out, opacity 0.4s ease-out;
  opacity: 0;
  pointer-events: none;
  z-index: 1;
}

.products .product:hover {
  transform: translateY(-6px);
  box-shadow: 0 -5px 15px rgba(0, 0, 0, 0.05),
              0 15px 30px rgba(0, 0, 0, 0.15);
}

.products .product:hover::before {
  opacity: 1;
  background: linear-gradient(45deg, #6a0dad, #007bff, #33FF57);
}
				
			
Scroll to Top