/* Product Item Hover Buttons Styles */

.ProductItem__ImageContainer {
    position: relative;
    overflow: hidden;
}

.ProductItem__HoverButtons {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.75);
    padding: 0 15px 15px 15px;
    transform: translateY(100%);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease-in-out;
    z-index: 10;
}

/* Only show buttons when hovering over the image container */
.ProductItem__ImageContainer:hover .ProductItem__HoverButtons {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

.ProductItem__Form {
    width: 100%;
    margin: 0;
    padding: 0;
}

.ProductItem__ButtonGroup {
    display: flex;
    gap: 10px;
    flex-direction: column;
}

.ProductItem__AddToCart,
.ProductItem__ViewDetails {
    flex: 1;
}

.ProductItem__AddToCart button,
.ProductItem__ViewDetails a {
    width: 100%;
    padding: 10px 15px;
    border: none;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    box-sizing: border-box;
}

.ProductItem__AddToCart button {
    background: #333;
    color: white;
}

.ProductItem__AddToCart button:hover {
    background: #000;
}

.ProductItem__ViewDetails a {
    background: transparent;
    color: #333;
    border: 1px solid #333;
}

.ProductItem__ViewDetails a:hover {
    background: #333;
    color: white;
}

.ProductItem__ViewDetails .Icon--eye {
    width: 14px;
    height: 14px;
}

/* Prevent buttons from showing when not hovering */
.ProductItem:not(:hover) .ProductItem__HoverButtons {
    transform: translateY(100%);
    opacity: 0;
    visibility: hidden;
}

/* Responsive adjustments */
@media screen and (max-width: 640px) {
    .ProductItem__HoverButtons {
        padding: 10px;
    }
    
    .ProductItem__AddToCart button,
    .ProductItem__ViewDetails a {
        padding: 8px 12px;
        font-size: 11px;
    }
}

@media screen and (min-width: 641px) {
    .ProductItem__ButtonGroup {
        flex-direction: row;
    }
}

/* Ensure proper positioning */
.ProductItem__ImageWrapper {
    position: relative;
    z-index: 1;
    display: block;
}

.ProductItem__Image {
    transition: transform 0.3s ease;
}

.ProductItem__ImageContainer:hover .ProductItem__Image {
    transform: scale(1.05);
}

/* Ensure buttons don't interfere with image link */
.ProductItem__ImageWrapper {
    pointer-events: auto;
}

.ProductItem__HoverButtons {
    pointer-events: none;
}

.ProductItem__HoverButtons.ProductItem__HoverButtons {
    pointer-events: auto;
}
