﻿/* Grid container */
.products {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    max-width: 1100px; /* 250px * 4 + gaps → controls width */
    margin: 0 auto; /* centers the grid in page */
}

/* Product card */
.product-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

    .product-card:hover {
        box-shadow: 0 4px 15px rgba(0,0,0,0.12);
        transform: translateY(-3px);
    }

    /* Product image */
    .product-card img {
        width: 100%;
        height: 180px;
        object-fit: cover;
        border-bottom: 1px solid #eee;
    }

/* Card body */
.product-body {
    padding: 12px 15px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.product-title {
    font-size: 14px;
    font-weight: 600;
    color: #222;
    margin-bottom: 6px;
    line-height: 1.3;
    min-height: 38px;
}

.product-price {
    font-size: 16px;
    font-weight: bold;
    color: #e67e22;
    margin: 8px 0;
}

.product-supplier {
    font-size: 12px;
    color: #555;
    margin-bottom: 10px;
}

/* Buttons */
.product-actions {
    display: flex;
    gap: 8px;
    margin-top: auto;
}

    .product-actions button {
        flex: 1;
        padding: 8px;
        border: 1px solid #ddd;
        border-radius: 8px;
        background: #fff;
        cursor: pointer;
        font-size: 13px;
        transition: all 0.2s ease;
    }

        .product-actions button:hover {
            background: #f5f5f5;
        }

    .product-actions .primary {
        background: #ff6600;
        color: #fff;
        border: none;
    }

        .product-actions .primary:hover {
            background: #e65c00;
        }
