.main {
    max-width: 850px;
    margin-top: 100px;
    margin-bottom: 100px;
    padding-left: 20px;
    padding-right: 20px;
    margin-left: auto;
    margin-right: auto;
}

.title {
    font-size: 25px;
    font-weight: 600;
    margin-bottom: 20px;
}

.ordersgrid {
    display: grid;
    grid-template-columns: 1fr;
    row-gap: 50px;   
}

.header{
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    background-color: #d1d5db;
    padding: 20px 25px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.leftheader {
    display: flex;
    flex-shrink: 0;
}

.headertitle {
    font-size: 16px;
    font-weight: 500;
    margin-right: 6px;
}

.date, .totals {
    margin-right: 45px;
}

.rightheader {
    flex-shrink: 1;
}

@media (max-width: 575px) {
    .header {
        flex-direction: column;
        align-items: start;
        line-height: 23px;
        padding: 15px;
    }

    .leftheader {
        flex-direction: column;
    }

    .date, .totals, .rightheader {
        display: grid;
        grid-template-columns: auto 1fr;
    }
}

.image {
    width: 100px;
}

.productcontainer {
    /* Shared styles for ALL products */
    border: 1px solid #d1d5db;
    border-top: none; /* Connects to the header or previous item */
    padding: 40px 25px;
    display: grid;
    grid-template-columns: 110px 1fr 220px;
    align-items: center;
    row-gap: 60px;
    column-gap: 35px;
    
    /* DEFAULT: Square corners so they stack perfectly */
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

/* MAGIC: Only round the corners of the very bottom product */
.productcontainer:last-child {
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
}

@media (max-width: 800px) {
    .productcontainer {
        grid-template-columns: 110px 1fr;
        row-gap: 0px;
        padding-bottom: 8px;
    }
}

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

.productimage {
    text-align: center;
}

.productname {
    margin-bottom: 5px;
    font-size: 15px;
    font-weight: 600;
}

.productarrive , .productquantity {
    margin-bottom: 3px;
}

.productquantity {
    margin-bottom: 8px;
}

.butitagain {
    width: 140px;
    font-size: 15px;
    margin-bottom: 8px;
    align-items: center;
    display: flex;
    justify-content: center;
    color: rgb(33, 33, 33);
    background-color: rgb(255, 216, 20);
    border: 1px solid rgb(252, 210, 0);
    border-radius: 8px;
    cursor: pointer;
    padding: 6px 0;
    box-shadow: 0 2px 5px rgba(213, 217, 217, 0.5);
}

.butitagain img {
    width: 25px;
    align-items: center;
    margin-right: 15px;
}

.anotherdimension {
  align-self: start;
}

.buttontrack {
    color: rgb(33, 33, 33);
    background: white;
    border: 1px solid rgb(213, 217, 217);
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(213, 217, 217, 0.5);
    width: 100%;
    padding: 10px 0;
    font-size: 15px;
}

@media (max-width: 800px) {
    .anotherdimension {
        grid-column: 2;
        width: 140px;
        margin-bottom: 30px;
    }
}



