/* Product Grid Styles */
#projects-container {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    justify-content: center;
}

.product-card {
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid #eee;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative; /* Ensure new stacking context */
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.08);
    border-color: transparent;
}

.product-image {
    position: relative;
    width: 100%;
    padding-top: 80%; /* Slightly taller aspect ratio */
    overflow: hidden;
    background-color: #fff;
    border-bottom: 1px solid #f5f5f5;
}

.product-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 30px; /* More breathing room */
    transition: transform 0.5s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.08);
}

.product-content {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    text-align: center;
    background: #fff;
    position: relative; /* Reset positioning */
    z-index: 1;
}

.product-content h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 20px;
    line-height: 1.4;
    min-height: 50px; /* Align buttons */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-btn {
    display: inline-block;
    padding: 12px 30px;
    background-color: var(--accent-color);
    color: var(--primary-color);
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    align-self: center;
    border: 2px solid var(--accent-color);
    text-transform: uppercase;
    font-size: 14px;
    letter-spacing: 0.5px;
}

.product-btn:hover {
    background-color: var(--primary-color);
    color: var(--accent-color);
    border-color: var(--primary-color);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .product-content {
        padding: 20px;
    }
    
    .product-content h3 {
        font-size: 16px;
        min-height: auto;
    }
}
