*{margin:0;padding:0;box-sizing:border-box}
body {
    display: flex;
    flex-direction: column;   /* ?? REQUIRED */
    align-items: stretch;     /* ?? REQUIRED */
}
main.container {
    width: 100%;
}

header{
    background:#2f2f2f;
    color:#fff;
    padding:30px 20px;
    text-align:center
}
header h1{font-size:36px;margin-bottom:15px}
nav a{
    color:#fff;
    text-decoration:none;
    margin:0 15px;
    font-weight:600
}
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 60px 24px;
}

/* PRODUCT GRID */
.product-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr); /* ?? FORCE 5 COLUMNS */
    gap: 32px;
    align-items: start;
}
@media (max-width: 1200px) {
    .product-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 992px) {
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .product-grid {
        grid-template-columns: 1fr;
    }
}

.product-card{
    background:#ffffff;
    padding:20px;
    border-radius:16px;
    box-shadow:0 10px 25px rgba(0,0,0,.08);
    transition:transform .2s ease, box-shadow .2s ease;
}

.product-card:hover{
    transform:translateY(-4px);
    box-shadow:0 14px 35px rgba(0,0,0,.12);
}

main{
    flex:1;
    padding:60px 40px
}
.grid{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(260px,1fr));
    gap:30px;
    max-width:1100px;
    margin:0 auto
}
.product-card{
    display:flex;
    flex-direction:column;
    justify-content:space-between;
}
.product-card img{
    width:100%;
    height:220px;          /* FIXED HEIGHT */
    object-fit:cover;      /* CROPS instead of stretching */
    border-radius:8px;
    margin-bottom:15px;
    background:#f0f0f0;
}
.product-card h2{font-size:20px;margin-bottom:10px}
.price{font-size:18px;font-weight:bold;margin:10px 0}
button{
    padding:8px 16px;
    border:1px solid #333;
    background:#fff;
    cursor:pointer
}
button:hover{
    background:#333;
    color:#fff
}
footer{
    background:#2f2f2f;
    color:#fff;
    text-align:center;
    padding:20px
}

/* GRID */
.product-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit, minmax(260px, 1fr));
    gap:40px;
}

/* CARD */
.product-card{
    background:#fff;
    padding:20px;
    border-radius:16px;
    box-shadow:0 10px 25px rgba(0,0,0,.08);
    text-align:left;
}
.site-footer a {
    color: #FF5;
}

.site-footer a:hover {
    color: #FFF;
}


/* IMAGE FIX   THIS IS THE KEY */
.product-image{
    width:100%;
    height:100%;
    overflow:hidden;
    border-radius:12px;
    background:#f2f2f2;
    display:flex;
    align-items:center;
    justify-content:center;
    margin-bottom:15px;
}

.product-image img{
    width:100%;
    height:100%;
    object-fit:cover;
    display:block;
}

/* TEXT */
.product-card h3{
    font-size:18px;
    margin:10px 0 6px;
}

.price{
    font-weight:600;
    margin-bottom:10px;
}

/* BUTTON */
.pay-now{
    color:#5a2ea6;
    font-weight:600;
    text-decoration:underline;
}
