/*=========================
CART BREADCRUMB
=========================*/

.cart-breadcrumb{
    background:#f3f4f6;
    padding:18px;
}

.cart-breadcrumb__container{
    display:flex;
    gap:10px;
    flex-wrap:wrap;
}

.cart-breadcrumb a{
    text-decoration:none;
    color:#2563eb;
}

/*=========================
CART LAYOUT (centered)
=========================*/

.cart{
    padding:60px 20px 90px;
    display:flex;
    justify-content:center;
}

.cart__wrapper{
    width:100%;
    max-width:850px;
    display:flex;
    flex-direction:column;
    align-items:center;
}

.cart__title{
    margin-bottom:30px;
    font-size:36px;
    text-align:center;
}

/*=========================
CART TABLE
=========================*/

.cart-table-scroll{
    width:100%;
    overflow-x:auto;
}

.cart-table{
    width:100%;
    border-collapse:collapse;
    background:#fff;
    box-shadow:0 8px 20px rgba(0,0,0,.08);
    border-radius:15px;
    overflow:hidden;
}

.cart-table th{
    background:#2563eb;
    color:#fff;
    padding:18px;
}

.cart-table td{
    padding:20px;
    border-bottom:1px solid #eee;
    text-align:center;
}

.cart-product{
    display:flex;
    align-items:center;
    gap:20px;
    text-align:left;
}

.cart-product img{
    width:80px;
    height:80px;
    object-fit:contain;
    flex-shrink:0;
}

.cart-product h3{
    margin-bottom:6px;
    font-size:16px;
}

.cart-product p{
    color:#777;
    font-size:14px;
}

.cart-remove{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    width:40px;
    height:40px;
    border:none;
    border-radius:50%;
    background:#ef4444;
    color:#fff;
    font-size:22px;
    line-height:1;
    text-decoration:none;
    cursor:pointer;
    transition:.2s;
}

.cart-remove:hover{
    background:#dc2626;
}

/*=========================
ORDER SUMMARY (simplified: just the grand total)
=========================*/

.cart-summary{
    width:100%;
    max-width:450px;
    background:#fff;
    padding:35px;
    border-radius:15px;
    box-shadow:0 8px 20px rgba(0,0,0,.08);
    margin-top:45px;
    text-align:center;
}

.cart-summary__heading{
    font-size:24px;
    margin-bottom:20px;
}

.cart-summary__row--total{
    display:flex;
    justify-content:space-between;
    align-items:center;
    font-size:24px;
    font-weight:bold;
    padding-bottom:25px;
    margin-bottom:25px;
    border-bottom:2px solid #eee;
}

.cart-summary__checkout{
    display:block;
    width:100%;
    padding:16px;
    border:none;
    background:#16a34a;
    color:#fff;
    border-radius:10px;
    font-size:17px;
    font-weight:600;
    text-align:center;
    text-decoration:none;
    cursor:pointer;
    transition:.3s;
    box-sizing:border-box;
}

.cart-summary__checkout:hover{
    background:#15803d;
}

.cart-summary__continue{
    display:block;
    text-align:center;
    margin-top:20px;
    text-decoration:none;
    color:#2563eb;
    font-weight:600;
}

/*=========================
EMPTY CART
=========================*/

.cart-empty{
    text-align:center;
    padding:60px 20px;
}

.cart-empty h2{
    margin-bottom:20px;
}

.cart-empty p{
    color:#666;
    margin-bottom:30px;
}

.cart-empty__button{
    display:inline-block;
    background:#2563eb;
    color:#fff;
    padding:15px 35px;
    border-radius:10px;
    text-decoration:none;
}

/*=========================
RESPONSIVE
=========================*/

@media(max-width: 768px){

    .cart{
        padding: 40px 16px 60px;
    }

    .cart-breadcrumb{
        padding: 15px 20px;
    }

    .cart__title{
        font-size: 28px;
    }

    .cart-summary{
        padding: 25px;
    }

    .cart-summary__row--total{
        font-size: 20px;
    }
}

@media(max-width: 600px){

    /* Remove table scroll wrapper restrictions */
    .cart-table-scroll{
        overflow-x: visible;
    }

    /* Convert table to block-based card layout */
    .cart-table, 
    .cart-table thead, 
    .cart-table tbody, 
    .cart-table th, 
    .cart-table td, 
    .cart-table tr {
        display: block;
        width: 100%;
        box-sizing: border-box;
    }

    /* Hide table header on mobile */
    .cart-table thead tr {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }

    .cart-table tr {
        border: 1px solid #eee;
        border-radius: 12px;
        margin-bottom: 15px;
        padding: 12px;
        background: #fff;
    }

    .cart-table td {
        border-bottom: 1px solid #f3f4f6;
        text-align: left;
        padding: 10px 0;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .cart-table td:last-child {
        border-bottom: none;
    }

    .cart-product {
        width: 100%;
    }

    .cart-product img {
        width: 60px;
        height: 60px;
    }
}