/* --- PRODUCT GRID & CARDS (The main store area) --- */ .product-grid { /* 1. Sets the space for the small cards */ max-width: 850px; /* Narrower container (850px) */ margin: 0 auto; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; padding: 20px 10px; } .product-card { border: 1px solid #DCDCDC; background-color: #FFFFFF; /* 2. FORCES the size calculation and shrinks internal padding */ padding: 8px; width: calc(25% - 7.5px); box-sizing: border-box; /* CRITICAL OVERRIDE: Remove any default fixed height/width */ min-width: 0; min-height: 0; max-height: fit-content; /* Ensure height is determined by content */ box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); transition: box-shadow 0.3s; text-align: center; } .product-card:hover { box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2); } /* 🖼️ IMAGE SIZE ADJUSTMENT */ .product-card img { width: 100%; /* 3. The smallest reasonable image height */ max-height: 120px; object-fit: contain; display: block; margin: 0 auto 5px auto; } /* 🏷️ Typography Adjustment for small cards */ .product-card h3 { font-size: 1em; margin: 5px 0; } .product-card p { font-size: 1em; margin-bottom: 5px; } .product-card a { padding: 5px 10px; margin-top: 5px; font-size: 0.9em; }