/* ==========================================
   GENERAL
========================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background-color: #f7f5ee;
    color: #35452b;
}


/* ==========================================
   CART PAGE
========================================== */

.cart-page {
    width: 90%;
    max-width: 1200px;

    margin: auto;

    padding: 40px 0 70px;
}


/* ==========================================
   BACK BUTTON
========================================== */

.back-btn {
    display: inline-block;

    text-decoration: none;

    color: #35452b;

    font-size: 17px;

    font-weight: bold;

    margin-bottom: 30px;

    transition: 0.3s;
}

.back-btn:hover {
    color: #8a9a5b;

    transform: translateX(-4px);
}


/* ==========================================
   TITLE
========================================== */

.cart-title {
    text-align: center;

    font-size: 40px;

    color: #35452b;

    margin-bottom: 45px;
}

.cart-title::after {
    content: "";

    display: block;

    width: 70px;

    height: 4px;

    background-color: #8a9a5b;

    border-radius: 10px;

    margin: 12px auto;
}


/* ==========================================
   CART CONTAINER
========================================== */

.cart-container {
    display: grid;

    grid-template-columns: 1fr 360px;

    gap: 30px;

    align-items: start;
}


/* ==========================================
   CART PRODUCTS
========================================== */

.cart-products {
    background-color: white;

    border-radius: 18px;

    padding: 25px;

    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
}

.cart-products h2 {
    font-size: 24px;

    margin-bottom: 25px;

    color: #35452b;
}


/* ==========================================
   CART ITEMS
========================================== */

#cart-items {
    display: flex;

    flex-direction: column;

    gap: 18px;
}


/* ==========================================
   SINGLE CART ITEM
========================================== */

.cart-item {
    display: flex;

    align-items: center;

    gap: 20px;

    padding: 18px;

    border: 1px solid #e4e7da;

    border-radius: 15px;

    background-color: #fcfcf8;

    transition: 0.3s;
}

.cart-item:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.07);
}


/* ==========================================
   PRODUCT IMAGE
========================================== */

.cart-product-image {
    width: 120px;

    height: 120px;

    object-fit: cover;

    border-radius: 14px;

    flex-shrink: 0;
}


/* ==========================================
   PRODUCT INFORMATION
========================================== */

.cart-product-info {
    flex: 1;
}

.cart-product-info h3 {
    font-size: 21px;

    margin-bottom: 8px;

    color: #35452b;
}

.cart-product-info p {
    font-size: 17px;

    color: #8a9a5b;

    font-weight: bold;

    margin-bottom: 12px;
}


/* ==========================================
   QUANTITY
========================================== */

.quantity {
    display: flex;

    align-items: center;

    gap: 12px;

    margin-bottom: 10px;
}

.quantity button {
    width: 32px;

    height: 32px;

    border: none;

    border-radius: 50%;

    background-color: #8a9a5b;

    color: white;

    font-size: 18px;

    cursor: pointer;

    transition: 0.3s;
}

.quantity button:hover {
    background-color: #687943;

    transform: scale(1.08);
}

.quantity span {
    min-width: 25px;

    text-align: center;

    font-size: 17px;

    font-weight: bold;
}


/* ==========================================
   REMOVE BUTTON
========================================== */

.remove-btn {
    border: none;

    background: none;

    color: #b85c5c;

    cursor: pointer;

    font-size: 14px;

    padding: 3px 0;

    transition: 0.3s;
}

.remove-btn:hover {
    color: #8c3030;

    text-decoration: underline;
}


/* ==========================================
   ORDER SUMMARY
========================================== */

.order-summary {
    background-color: white;

    border-radius: 18px;

    padding: 28px;

    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);

    position: sticky;

    top: 25px;
}

.order-summary h2 {
    font-size: 24px;

    color: #35452b;

    margin-bottom: 25px;

    padding-bottom: 18px;

    border-bottom: 1px solid #e4e7da;
}


/* ==========================================
   PRICE ROW
========================================== */

.price-row {
    display: flex;

    justify-content: space-between;

    align-items: center;

    font-size: 16px;

    color: #555;

    margin-bottom: 18px;
}

.price-row span:last-child {
    font-weight: bold;

    color: #35452b;
}


/* ==========================================
   DISCOUNT
========================================== */

.discount {
    margin-top: 25px;

    margin-bottom: 25px;
}

.discount label {
    display: block;

    font-size: 15px;

    font-weight: bold;

    color: #35452b;

    margin-bottom: 10px;
}


/* ==========================================
   DISCOUNT BOX
========================================== */

.discount-box {
    display: flex;

    gap: 8px;
}

.discount-box input {
    flex: 1;

    min-width: 0;

    padding: 12px;

    border: 1px solid #ccd3bd;

    border-radius: 8px;

    outline: none;

    font-size: 14px;
}

.discount-box input:focus {
    border-color: #8a9a5b;
}


/* ==========================================
   APPLY BUTTON
========================================== */

#apply-discount {
    padding: 0 16px;

    border: none;

    border-radius: 8px;

    background-color: #35452b;

    color: white;

    font-weight: bold;

    cursor: pointer;

    transition: 0.3s;
}

#apply-discount:hover {
    background-color: #8a9a5b;
}


/* ==========================================
   DISCOUNT MESSAGE
========================================== */

#discount-message {
    margin-top: 8px;

    font-size: 13px;

    color: #8a9a5b;
}


/* ==========================================
   DISCOUNT AMOUNT
========================================== */

#discount-amount {
    color: #8a9a5b;
}


/* ==========================================
   TOTAL
========================================== */

.total-row {
    display: flex;

    justify-content: space-between;

    align-items: center;

    border-top: 1px solid #e4e7da;

    padding-top: 20px;

    margin-top: 15px;

    font-size: 21px;

    font-weight: bold;

    color: #35452b;
}

#cart-total {
    color: #8a9a5b;
}


/* ==========================================
   PAYMENT BUTTON
========================================== */

.payment-btn {
    width: 100%;

    margin-top: 25px;

    padding: 15px;

    border: none;

    border-radius: 10px;

    background-color: #8a9a5b;

    color: white;

    font-size: 17px;

    font-weight: bold;

    cursor: pointer;

    transition: 0.3s;
}

.payment-btn:hover {
    background-color: #687943;

    transform: translateY(-2px);

    box-shadow: 0 5px 12px rgba(53, 69, 43, 0.2);
}


/* ==========================================
   EMPTY CART
========================================== */

#cart-items > h2 {
    text-align: center;

    padding: 60px 20px;

    color: #8a9a5b;

    font-size: 22px;
}


/* ==========================================
   RESPONSIVE - TABLET
========================================== */

@media (max-width: 900px) {

    .cart-container {
        grid-template-columns: 1fr;
    }

    .order-summary {
        position: static;

        width: 100%;
    }

}


/* ==========================================
   RESPONSIVE - MOBILE
========================================== */

@media (max-width: 600px) {

    .cart-page {
        width: 92%;

        padding-top: 25px;
    }

    .cart-title {
        font-size: 30px;

        margin-bottom: 30px;
    }

    .cart-products {
        padding: 15px;
    }

    .order-summary {
        padding: 20px;
    }

    .cart-item {
        padding: 12px;

        gap: 12px;

        align-items: flex-start;
    }

    .cart-product-image {
        width: 85px;

        height: 85px;
    }

    .cart-product-info h3 {
        font-size: 17px;
    }

    .cart-product-info p {
        font-size: 15px;
    }

    .quantity button {
        width: 28px;

        height: 28px;
    }

    .discount-box {
        flex-direction: column;
    }

    #apply-discount {
        height: 42px;
    }

}