/* Basic Reset and Typography */
body {
    font-family: sans-serif;
    margin: 0;
    padding: 20px;
    background-color: #f7f7f7;
    color: #333;
}

h1, h2 {
    color: #333;
}

/* --- MAIN LAYOUT (Two-Column) --- */
.container {
    display: flex;
    max-width: 1200px;
    margin: 0 auto;
}

.sidebar {
    width: 250px;
    padding-right: 30px; /* Increased space for better separation */
    position: sticky;
    top: 20px;
}

.product-list-container {
    flex-grow: 1;
    padding-left: 20px;
}

/* --- GRID STYLING --- */
#product-list {
    display: grid;
    /* Responsive grid: Creates 4 columns but allows shrinking/growing */
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); 
    gap: 30px; 
    padding: 0;
}

/* --- PRODUCT CARD STYLING (Modern/Smooth) --- */
.product-card {
    border: 3px solid #ddd; /* FAT BORDER */
    border-radius: 12px; /* SMOOTH EDGES */
    padding: 15px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08); /* Soft shadow */
    display: flex;
    flex-direction: column; 
    background-color: white;
    transition: transform 0.2s;
}

.product-card:hover {
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15); /* Lift effect */
    transform: translateY(-2px);
}

/* --- FILTER CONTROLS STYLING --- */
.sidebar button, .sidebar select {
    border-radius: 8px; /* Smooth corners for controls */
    border: 1px solid #ccc;
    padding: 8px;
    width: 100%;
    margin-bottom: 10px;
}

/* --- IMAGE CONTAINER AND FITTING FIX --- */
.product-image-container {
    height: 150px; 
    overflow: hidden;
    margin-bottom: 10px;
    border-radius: 4px;
    display: flex; 
    justify-content: center;
    align-items: center;
}

.product-image {
    max-width: 100%;
    max-height: 100%;
    /* FIX: Ensures the whole image is visible, scaled down to fit the box */
    object-fit: contain; 
}

/* --- BUTTON STYLING (The "Get it" button) --- */
.get-it-button {
    display: block; 
    width: 90%;
    padding: 10px 15px;
    margin-top: auto; 
    text-align: center;
    text-decoration: none;
    background-color: #5cb85c; 
    color: white;
    border: 2px solid #5cb85c; /* FAT BORDER */
    border-radius: 8px; 
    font-weight: bold;
    align-self: center; 
}

.get-it-button:hover {
    background-color: #4cae4c;
}
