.image-container {
    position: relative;
    overflow: hidden;
}

.image-container img {
    display: block;
    width: 100%;
}

.hover-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0);
    transition: background 0.4s ease;
    z-index: 1;
}

.image-container:hover .hover-overlay {
    background: rgba(0, 0, 0, 0.5); /* Dimming effect on image */
}



.hover-buttons {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    gap: 10px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
    z-index: 2;
}

.hover-buttons a {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s ease;
    width: auto; /* Adjust width to content */
    white-space: nowrap; /* Prevents text wrapping */
    padding-left: 15px;
    padding-right: 15px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.image-container:hover .hover-buttons {
    opacity: 1;
    visibility: visible;
}

.image-container:hover .hover-buttons a {
    opacity: 1;
    transform: translateY(0);
}

.image-container:hover .hover-buttons .buy-now {
    transition-delay: 0.2s;
}

.image-container:hover .hover-buttons .add-to-cart {
    transition-delay: 0.4s;
}
