/* ---------- General Body ---------- */
body {
    font-family: Arial, sans-serif;
    background: #f5f5f5;
    margin: 0;
    padding: 0;
}

/* ---------- Header ---------- */
header {
    background: #0A66C2; /* blue */
    padding: 15px 20px;
}

header nav {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
}

header nav a {
    color: white;
    text-decoration: none;
    font-weight: 600;
    padding: 5px 10px;
    transition: 0.2s;
}

header nav a.active,
header nav a:hover {
    border-bottom: 2px solid #00A878; /* green accent */
}

/* ---------- Products Section ---------- */
.products-page {
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 20px;
}

.products-page h1 {
    text-align: center;
    margin-bottom: 25px;
    color: #0A66C2;
}

/* ---------- Filter Bar ---------- */
.filter-bar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-bottom: 20px;
    gap: 10px;
}

.filter-bar label {
    font-weight: 600;
}

.filter-bar select {
    padding: 5px 8px;
    border-radius: 5px;
    border: 1px solid #ccc;
}

/* ---------- Product Grid ---------- */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
    justify-items: center;
}

/* ---------- Product Card ---------- */
.product-card {
    background: white;
    border-radius: 10px;
    padding: 15px;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    transition: 0.3s;
    max-width: 200px; /* keeps card small and images contained */
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 18px rgba(0,0,0,0.15);
}

/* ---------- Product Images ---------- */
.product-card img {
    width: 100%;
    max-width: 150px;  /* smaller images */
    height: 120px;     /* fixed height for uniformity */
    object-fit: contain; /* maintain aspect ratio */
    border-radius: 8px;
    margin: 0 auto 10px;
    display: block;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.product-card img:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* ---------- Titles & Price ---------- */
.product-card h3 {
    margin: 5px 0;
    color: #0A66C2;
}

.product-card p {
    margin: 5px 0;
    color: #333;
}

.product-card .price {
    font-weight: bold;
    color: #00A878;
    margin-bottom: 10px;
}

/* ---------- Buttons ---------- */
.product-card button {
    padding: 8px 12px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    margin: 3px 5px;
    transition: 0.2s;
}

.product-card button:hover {
    opacity: 0.9;
}

.product-card .details {
    background: #00A878;
    color: white;
}

.product-card .details:hover {
    background: #008f6a;
}

.product-card button.add-cart {
    background: #0A66C2;
    color: white;
}

.product-card button.add-cart:hover {
    background: #0073b1;
}

/* ---------- Responsive ---------- */
@media screen and (max-width: 600px) {
    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }
    .product-card img {
        max-width: 120px;
        height: 100px;
    }
}