/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Segoe UI", Tahoma, Arial, sans-serif;
    background: #f4f6fb;
    color: #333;
    min-height: 100vh;
}

/* Header */
header {
    background: linear-gradient(135deg, #4f46e5, #6366f1);
    color: #fff;
    padding: 25px 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

header h1 {
    text-align: center;
    margin-bottom: 20px;
    font-size: 2rem;
    letter-spacing: 1px;
}

/* Controls */
.controls {
    max-width: 1100px;
    margin: auto;
    display: grid;
    grid-template-columns: 1fr 200px 200px;
    gap: 15px;
}

.controls input,
.controls select {
    padding: 12px 14px;
    border-radius: 8px;
    border: none;
    outline: none;
    font-size: 0.95rem;
}

.controls input {
    width: 100%;
}

.controls select {
    cursor: pointer;
}

.controls input:focus,
.controls select:focus {
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.4);
}

/* Main */
main {
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 20px;
}

/* Status Message */
#statusMessage {
    text-align: center;
    margin-bottom: 20px;
    font-weight: 500;
}

/* Grid */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 25px;
}

/* Card */
.card {
    background: #fff;
    border-radius: 14px;
    padding: 15px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

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

/* Product Image */
.card img {
    width: 100%;
    height: 180px;
    object-fit: contain;
    margin-bottom: 12px;
}

/* Product Title */
.card h3 {
    font-size: 1rem;
    margin-bottom: 8px;
    line-height: 1.4;
    height: 45px;
    overflow: hidden;
}

/* Category */
.card .category {
    font-size: 0.85rem;
    color: #6b7280;
    margin-bottom: 10px;
}

/* Price */
.card .price {
    font-size: 1.1rem;
    font-weight: bold;
    color: #4f46e5;
    margin-top: auto;
}

/* Empty State */
.grid p {
    grid-column: 1 / -1;
    text-align: center;
    font-size: 1.1rem;
    color: #6b7280;
}

/* Responsive */
@media (max-width: 900px) {
    .controls {
        grid-template-columns: 1fr;
    }
}
