* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    font-family: Arial, sans-serif;
    background-color: #d6d6d6;
    padding-top: 20px;
    width: 100%;
    height: 100%;
    transition: margin-right 0.3s ease;
    padding-bottom: 20px;
}

header {
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
#shop-icon {
    width: 40px;
    position: relative;
    cursor: pointer;
    margin-right: 30px;
    transition: all 0.3s ease;
}
#cart-count {
    position: absolute;
    top: 88px;
    right: 5px;
    background-color: red;
    color: white;
    border-radius: 50%;
    padding: 6px 10px;
    font-size: 12px;
    margin-right: 30px;
}
h1 {
    margin-left: 30px;
    font-weight: bold;
    font-size: 2.5rem;
}
#input {
    width: 90%;
    max-width: 300px;
    padding: 10px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    margin-top: 15px;
    margin-left: 40%;
}
.container {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    margin-top: 30px;
    background-color: #9f9f9f;
    height: 100%;
    width: 90%;
    padding: 20px;
    margin: auto;
    border-radius: 10px;
    box-shadow: 2px 4px 8px rgba(0, 0, 0, 0.6);
}
#div-Icon {
   transition: all 0.3s ease;
}
.product {
    background-color: #cfcfcf;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    width: 30%;
    margin-bottom: 20px;
    position: relative;
    max-height: 500px;
}
h2 {
    margin-bottom: 10px;
}
.img-product {
    width: 90%;
}
.plus {
    position: absolute;
    top: 0;
    right: 0;
    width: 10%;
    padding: 10px;
    border: none;
    background-color: yellow;
    cursor: pointer;
    transition: all 0.3s ease;
}
.plus:hover {
    background-color: darkorange;
}
em {
    display: block;
    margin-top: 10px;
}
.em {
    margin-top: 50px;
}
#cart {
    position: fixed;
    display: none;
    top: 50%;
    text-align: center;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color:  #9f9f9f;
    color: white;
    border-radius: 10px;
    padding: 20px 20px 60px 20px;
   
    overflow: hidden;
    width: 40%;
    max-height: 80vh;
    box-shadow: 2px 4px 8px rgba(0, 0, 0, 0.4);
}
#cart-items {
    overflow-y: auto;
    max-height: calc(80vh - 140px);
}
#cart h2 {
    margin-bottom: 40px;
}
.cart-button {
    padding: 10px 20px;
    border: none;
    cursor: pointer;
    width: 50%;
    position: absolute;
    color: white;
    bottom: 0;
   transition: all 0.3s ease;
}
.cart-button:hover {
    opacity: 0.8;
    color: black;
}
#checkout-button {
    background-color: yellow;
    font-size: 1.2rem;
    left: 0;
}
#cancel-button {
    background-color: rgba(255, 0, 0, 0.39);
    font-weight: bold;
    font-size: 1.1rem;
    right: 0;
}
.green {
    color: green;
    font-weight: bold;
}
.div {
    width: 100%;
    background-color: #c0c0c0;
    display: flex;
    position: relative;
    justify-content: space-between;
    margin-bottom: 15px;
    padding-left: 5px;
}
#total {
    position: fixed;
    top: 80%;
    left: 45%;
}
.price {
    position: absolute;
    top: 20px;
    font-size: 1.2rem;
}
.efect {
    color: rgb(2, 162, 2);
    position: absolute;
    top: 80px;
    left: 95%;
    transition: all 0.5 ease;
}
.efectTwo {
    transform: translateX(-10px);
}
.addBtn:hover {
    background-color: darkgray;
}
.backBtn:hover {
    background-color: darkgray;
}
.totalePrice {
    margin-top: 20px;
    font-size: 1.2rem;
}
.div {
    width: 100%;
    background-color: #c0c0c0;
    display: flex;
    align-items: center;
    position: relative;
    margin-bottom: 15px;
    padding: 10px;
    gap: 10px;
    min-height: 80px;
    border-radius: 5px;
}

.description {
    flex: 1;
    font-size: 0.8rem;
    color: #333;
    /* احذف position, left, margin-top */
}

.p {
    font-size: 1rem;
    font-weight: bold;
    color: green;
    white-space: nowrap;
    /* احذف position, absolute, left, margin-top */
}

.addText {
    font-size: 1rem;
    color: green;
    /* احذف position, absolute, top, right */
}

.backBtn, .addBtn {
    padding: 2px 8px;
    border: none;
    background-color: gray;
    color: white;
    cursor: pointer;
    /* احذف position, absolute, top, left */
}

.btn {
    padding: 5px 7px;
    border: none;
    background-color: red;
    color: white;
    cursor: pointer;
    position: absolute;
    right: 0;
    top: 0;
    /* احذف position absolute */
}
@media (max-width: 768px) {
    .container {
        width: 95%;
        margin-left: auto;
        margin-right: auto;
        padding: 10px;
    }

    .product {
        width: 100%;
    }

    #cart {
        width: 90%;
    }

    #input {
        margin-left: auto;
        margin-right: auto;
        display: block;
        width: 90%;
    }

    #cart-count {
        top: 75px;
        right: 5px;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 1.8rem;
    }

    .description {
        font-size: 0.7rem;
    }
}
