* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    width: 100vw;
    display: flex;
    flex-direction: column;
    font-family: 'Lucida Sans', Geneva, Verdana, sans-serif;
}

/* ---------- HEADER ---------- */
header {
    height: 10vh;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 10px;
    box-shadow: 0 0 5px 2px black;
}

/* ---------- MAIN ---------- */
main {
    min-height: 90vh;
    padding: 30px 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* ---------- CART CARD ---------- */
.cart-card {
    width: 100%;
    background: white;
    border-radius: 20px;
    padding: 15px 20px;
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.533);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* ---------- CART HEADER ---------- */
.cart-header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

/* title */
.cart-title {
    font-size: large;
    font-weight: bold;
    color: #333;
}

/* ---------- ACTION ICONS ---------- */
.cart-actions {
    display: flex;
    justify-content: space-evenly;
    gap: 10px;
}

.cart-actions span {
    cursor: pointer;
    font-size: 18px;
    padding: 5px;
}

.delete_icon {
    color: red;
    padding: 5px;
}

/* ---------- ITEMS CONTAINER ---------- */
.cart-items {
    width: 100%;
    display: none;              /* IMPORTANT */
    flex-direction: column;
    gap: 8px;
    margin: 10px 0 0 0px;
    padding: 10px 20px;
    border-radius: 12px;
    background: #f9f9f9;
    box-shadow: inset 0 0 6px rgba(0,0,0,0.2);
}

/* ---------- SINGLE ITEM ---------- */
.cart-item {
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 8px 10px;
    border-bottom: 1px dashed #bbb;
}
.cart_itemName{
    font-size: large;
    width: 80%;
}
.cart_itemWeight{
    font-size: medium;
    min-width: 30%;
    display: flex;
    justify-content: end;
    align-items: center;

}

.cart-item:last-child {
    border-bottom: none;
}

/* ---------- DELETE POPUP ---------- */
.popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.popup-box {
    background: white;
    padding: 20px 25px;
    border-radius: 18px;
    text-align: center;
    width: 80%;
    max-width: 300px;
}

.popup-box p {
    font-size: 16px;
    margin-bottom: 20px;
}

.popup-buttons {
    display: flex;
    justify-content: space-between;
}

.popup-buttons button {
    border: none;
    padding: 8px 18px;
    border-radius: 15px;
    font-size: 15px;
    cursor: pointer;
}

.cancel-btn {
    background: gray;
    color: white;
}

.confirm-btn {
    background: red;
    color: white;
}

/* ---------- RENAME MODAL ---------- */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 999;
}

.modal-box {
    background: white;
    width: 90%;
    max-width: 320px;
    padding: 20px;
    border-radius: 15px;
}

.modal-box h3 {
    margin-bottom: 10px;
}

.modal-box input {
    width: 100%;
    padding: 10px;
    border-radius: 10px;
    border: 1px solid #ccc;
}

.modal-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 15px;
}

.modal-actions button {
    padding: 8px 18px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
}

#confirmRename {
    background: #4CAF50;
    color: white;
}

#cancelRename {
    background: #ddd;
}
