https://i.sstatic.net/KM3T2.png https://i.sstatic.net/tcUDg.png
.product-row {
margin: 0px 0px 0px 0px;
}
.product-box {
display: flex;
flex-direction: column;
width: 300px;
padding: 15px;
margin: 0px 26px;
position: relative;
overflow: hidden;
}
.p-img-container {
width: 100%;
height: 100%;
display: flex;
overflow: hidden;
}
.p-img a, .p-img {
width: 100%;
height: 100%;
display: flex;
}
.p-img a img{
width: 100%;
height: 100%;
object-position: center;
object-fit: contain;
}
.label-sale {
position: absolute;
top: 10px;
right: -30px;
font-size: 12px;
font-weight: 500;
letter-spacing: 1px;
padding: 5px 12px;
transform: rotate(45deg);
width: 110px;
}
.product-box .product-icon {
position: absolute;
display: flex;
flex-direction: row;
justify-content: center;
align-items: center;
list-style: none;
top: 220px;
left: 5px;
visibility: hidden;
opacity: 0;
transform: translateY(40%);
transition: opacity 0.5s, transform 0.5s;
}
.product-box:hover .product-icon {
visibility: visible;
opacity: 1;
transform: translateY(0);
}
.product-box:hover .product-icon,
.product-box:not(:hover) .product-icon {
transition-delay: 0.1s;
}
.product-icon li a {
padding-left: 50px;
width: 46px;
height: 46px;
box-shadow: 0 15px 25px #00000014;
border-radius: 50%;
margin-left: 10px;
margin-right: 10px;
display: block;
margin-bottom: 13px;
transition: .3s;
color: #000;
background: #fff;
}
.product-icon li a:hover {
color: white;
background: #51adcd;
}
.product-icon .icon-1{
position: absolute;
top: 16px;
left: 68px;
}
.product-icon .icon-2{
position: absolute;
top: 16px;
left: 138px;
}
.product-icon .icon-3{
position: absolute;
top: 16px;
left: 208px;
}
.product-title a {
color: black;
font-size: 16px;
font-weight: inherit;
text-decoration: none;
}
.product-title a:hover {
color: #51adcd;
}
.product-price s {
color: gray;
font-weight: 700;
font-size: 15px;
}
.product-price span {
color: #51adcd;
font-weight: 700;
font-size: 15px;
}
<div class="product-box">
<div class="product">
<div class="img-product">
<a href="">
<img style="width: 100%;" src="homepagepicture/shoes1.webp" alt="">
</a>
<figure style="background: #e12c43; color: #ffffff;" class="label-sale">
<span>-20%</span>
</figure>
<ul class="product-icon">
<li class="add-cart mr-0">
<a href="">
<i class="fa-solid fa-bag-shopping icon-1"></i>
</a>
</li>
<li class="view-product mr-0">
<a href="">
<i class="fa-solid fa-magnifying-glass icon-2"></i>
</a>
</li>
<li class="add-favorite mr-0">
<a href="">
<i class="fa-regular fa-heart icon-3"></i>
</a>
</li>
</ul>
</div>
<h4 class="product-title">
<a href="">Aero Wave 19</a>
</h4>
<p class="product-price">
<s class="">$156.00</s>
<span class="">$124.95</span>
</p>
</div>
</div>
The movement of the product icons along with the product box is not responsive even after setting the product-box to relative position. The label sale moves correctly but the picture icon does not. I have attached some images showing what needs to be fixed.