.product-card {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease-in-out;
    height: 100%; /* Ensure cards in a row have equal height */
}

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

.product-card a {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-card-img {
    width: 100%;
    height: 150px; /* Fixed height for images */
    object-fit: cover;
    border-bottom: 1px solid #eee;
}

.no-image-placeholder {
    width: 100%;
    height: 200px;
    background-color: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888;
    font-size: 1rem;
    text-align: center;
    border-bottom: 1px solid #eee;
}

.product-card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #333;
    margin: 15px 15px 5px;
    flex-grow: 1; /* Allows title to take up available space */
    line-height: 1.4;
}

.product-card-category {
    font-size: 0.9rem;
    color: #777;
    margin: 0 15px 10px;
}

.product-card-price {
    font-size: 1.3rem;
    font-weight: 700;
    color: #007bff;
    margin: 0 15px 15px;
}

.product-card-actions {
    padding: 10px 15px 15px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.add-to-cart-btn, .view-details-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 5px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
    background-color: #007bff; /* Blue for Add to Cart and View Details */
    color: white;
    border: none;
}

.add-to-cart-btn:hover, .view-details-btn:hover {
    background-color: #0056b3;
}

.out-of-stock-btn {
    background-color: #6c757d;
    color: white;
    border: none;
    cursor: not-allowed;
}

.out-of-stock-btn:hover {
    background-color: #5a6268;
}

.wishlist-btn {
    background-color: #f8f9fa;
    color: #dc3545;
    border: 1px solid #dc3545;
    display: inline-flex;
    align-items: center;
    justify-content: center; /* Center the icon */
    padding: 8px;
    border-radius: 5px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.wishlist-btn:hover {
    background-color: #dc3545;
    color: white;
}

.wishlist-btn svg {
    fill: currentColor;
}

/* Responsive adjustments for product cards */
@media (max-width: 768px) {
    .product-card {
        margin-bottom: 15px;
    }

    .product-card-img {
        height: auto; /* Allow height to adjust based on aspect ratio */
        max-width: 100%; /* Ensure image doesn't overflow its container */
        object-fit: cover; /* Maintain cover property */
    }

    .no-image-placeholder {
        height: 100px; /* Adjust placeholder height for mobile */
    }

    .product-card-title {
        font-size: 1.1rem;
        margin: 10px 10px 5px;
    }

    .product-card-category {
        font-size: 0.85rem;
        margin: 0 10px 8px;
    }

    .product-card-price {
        font-size: 1.2rem;
        margin: 0 10px 10px;
    }

    .product-card-actions {
        flex-direction: row; /* Changed to row to keep buttons on a single line */
        gap: 8px;
        padding: 10px;
        flex-wrap: wrap; /* Allow wrapping if content is too wide, but prioritize single line */
    }

    .add-to-cart-btn,
    .view-details-btn,
    .wishlist-btn {
        flex-grow: 1; /* Allow buttons to grow and share space */
        width: auto; /* Allow width to be determined by flex-grow */
        justify-content: center;
        padding: 10px 8px; /* Adjusted padding for smaller screens */
        font-size: 0.9rem; /* Slightly smaller font size for mobile buttons */
    }
}
