﻿/* ============================================
   SHOPPING CART
   ============================================ */

.cart-page {
    max-width: 1100px;
    margin: 40px auto;
    padding: 0 20px;
}


/* ============================================
   Cart Header
   ============================================ */

.cart-header {
    text-align: center;
    margin-bottom: 35px;
}

    .cart-header h1 {
        margin: 0;
        font-size: 36px;
    }

    .cart-header p {
        margin-top: 8px;
        color: #666;
    }


/* ============================================
   Cart Items Container
   ============================================ */

.cart-items {
    display: flex;
    flex-direction: column;
    gap: 20px;
}


/* ============================================
   Individual Cart Item
   ============================================ */

.cart-item {
    display: flex;
    align-items: center;
    gap: 25px;
    padding: 20px;
    background: #ffffff;
    border: 1px solid #e2e2e2;
    border-radius: 12px;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.06);
}


/* ============================================
   Product Image
   ============================================ */

.cart-image {
    width: 130px;
    height: 130px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f7f7f7;
    border-radius: 10px;
    overflow: hidden;
}

    .cart-image img {
        width: 100%;
        height: 100%;
        object-fit: contain;
    }


/* ============================================
   Product Information
   ============================================ */

.cart-information {
    flex: 1;
}

    .cart-information h2 {
        margin: 0 0 12px;
        font-size: 22px;
    }

    .cart-information p {
        margin: 7px 0;
        color: #555;
    }


    /* ============================================
   Price
   ============================================ */

    .cart-information strong {
        color: #111;
    }


    /* ============================================
   Quantity Form
   ============================================ */

    .cart-information form {
        margin-top: 15px;
    }

    .cart-information input[type="number"] {
        width: 70px;
        padding: 8px 10px;
        margin-left: 8px;
        border: 1px solid #ccc;
        border-radius: 6px;
        font-size: 15px;
    }


    /* ============================================
   Update Button
   ============================================ */

    .cart-information form button {
        margin-left: 8px;
        padding: 8px 14px;
        border: none;
        border-radius: 6px;
        background: #222;
        color: white;
        cursor: pointer;
        transition: 0.2s ease;
    }

        .cart-information form button:hover {
            opacity: 0.85;
        }


    /* ============================================
   Remove Button
   ============================================ */

    .cart-information form:last-child {
        margin-top: 12px;
    }

    .cart-information form button[type="submit"] {
        font-size: 14px;
    }


/* ============================================
   Cart Summary
   ============================================ */

.cart-summary {
    margin-top: 35px;
    padding: 25px;
    background: #f8f8f8;
    border-radius: 12px;
    text-align: right;
    border: 1px solid #e1e1e1;
}

    .cart-summary h2 {
        margin: 0 0 10px;
        font-size: 24px;
    }

.cart-total {
    margin-bottom: 20px;
    font-size: 28px;
    font-weight: bold;
}


/* ============================================
   Continue Shopping Button
   ============================================ */

.cart-summary .shop-view-button {
    display: inline-block;
    padding: 12px 22px;
    text-decoration: none;
    border-radius: 7px;
}


/* ============================================
   Empty Cart
   ============================================ */

.cart-empty {
    text-align: center;
    padding: 70px 20px;
    background: #f8f8f8;
    border-radius: 12px;
    border: 1px solid #e2e2e2;
}

    .cart-empty h3 {
        margin-bottom: 10px;
        font-size: 26px;
    }

    .cart-empty p {
        color: #666;
        margin-bottom: 25px;
    }


/* ============================================
   Mobile Layout
   ============================================ */

@media (max-width: 700px) {

    .cart-page {
        margin: 25px auto;
        padding: 0 12px;
    }

    .cart-header h1 {
        font-size: 30px;
    }

    .cart-item {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }

    .cart-image {
        width: 160px;
        height: 160px;
        margin: 0 auto;
    }

    .cart-information h2 {
        font-size: 20px;
    }

    .cart-information form {
        display: flex;
        justify-content: center;
        align-items: center;
        flex-wrap: wrap;
        gap: 8px;
    }

    .cart-information input[type="number"] {
        margin-left: 0;
    }

    .cart-information form button {
        margin-left: 0;
    }

    .cart-summary {
        text-align: center;
    }

    .cart-total {
        font-size: 25px;
    }
}



.cart-checkout-button {
    margin-top: 25px;
    text-align: right;
}

.checkout-button {
    display: inline-block;
    padding: 12px 28px;
    background: #007bff;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    transition: 0.2s ease;
}

    .checkout-button:hover {
        background: #0056b3;
        color: white;
    }