﻿
/* ----- PHIÊN BẢN DESKTOP (giữ nguyên) ----- */
.cart-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-width: 800px;
    margin: 0px auto 200px auto;
    font-family: Arial, sans-serif;
}

.cart-item1, .cart-item2 {
    display: flex;
    align-items: center;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 6px;
    padding: 15px;
    gap: 15px;
}

.cart-img {
    width: 80px;
    height: 80px;
    object-fit: cover;
}

.cart-info {
    flex: 1;
}

.bag-plus {
    width: 44px;
    height: 44px;
    border: 1.5px solid #333;
    border-radius: 6px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    cursor: pointer;
    transition: all 0.25s ease;
}

    /* img svg */
    .bag-plus img {
        width: 24px;
        height: 24px;
        transition: transform 0.25s ease, filter 0.25s ease;
    }

    /* hover */
    .bag-plus:hover {
        background: #ff7a00; /* cam */
        border-color: #ff7a00;
    }

        /* đổi màu svg (qua filter) */
        .bag-plus:hover img {
            filter: brightness(0) invert(1);
            transform: scale(1.1);
        }

    /* active */
    .bag-plus:active {
        transform: scale(0.95);
    }

.gio-hang-total {
    font-size: 18px;
    font-weight: bold;
    color: #333;
    margin-bottom: 10px;
}

.btn-primary {
    background-color: #007bff !important;
    border: none !important;
    padding: 15px 30px !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    border-radius: 8px !important;
    transition: all 0.3s ease !important;
}

    .btn-primary:hover {
        background-color: #0056b3;
        transform: translateY(-2px);
        box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    }

    .btn-primary:active {
        transform: translateY(0);
        box-shadow: none;
    }

.cart-list-new {
    height: 350px; /* giới hạn chiều cao */
    overflow-y: auto; /* scroll dọc */
    padding-right: 6px; /* tránh che nội dung bởi scrollbar */
}
.cart-name {
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 5px;
    color: #333;
}

.cart-sale {
    color: #ff5733;
    font-weight: bold;
    font-size: 14px;
}

.cart-price {
    font-weight: bold;
    font-size: 16px;
    white-space: nowrap;
    margin-right: 15px;
}

.cart-qty {
    display: flex;
    align-items: center;
    border: 1px solid #ccc;
    border-radius: 4px;
}

    .cart-qty input {
        width: 40px;
        text-align: center;
        border: none;
        outline: none;
        font-size: 14px;
    }

.qty-btn {
    background: none;
    border: none;
    width: 28px;
    height: 28px;
    font-size: 16px;
    cursor: pointer;
}

.cart-remove img {
    width: 20px;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
}

    .cart-remove img:hover {
        opacity: 1;
    }

@media (max-width: 576px) {
    .cart-item1 {
        flex-direction: column; /* đổi từ ngang sang dọc */

        text-align: center; /* chữ trong cart-item căn giữa */
        width: 95%; /* chỉ chiếm 95% */
        margin: 10px auto 15px auto; /* căn giữa toàn bộ item */
        border: 1px solid #eee; /* thêm viền nhẹ cho đẹp */
        border-radius: 8px;
        padding: 10px;
        box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    }

    .responsive-gio-hang {
        justify-content: flex-start !important; /* canh trái */
    }

        .responsive-gio-hang .text-end {
            text-align: left !important; /* chữ và nút cũng căn trái */
            margin-left: 2.5% !important;
        }

    .cart-img {
        width: 100%;
        max-width: 150px; /* ảnh to hơn cho mobile */
        height: auto;
        margin: 0 auto 10px; /* căn giữa */
        display: block;
    }

    .cart-info {
        width: 100%;
        margin-bottom: 10px;
    }

    .cart-name {
        font-size: 16px;
        font-weight: 600;
        text-align: center; /* căn giữa tên sản phẩm */
    }

    .cart-price {
        margin: 10px 0;
        font-size: 18px;
        color: #e67e22;
        font-weight: bold;
        text-align: center; /* căn giữa giá sản phẩm */
    }

    .cart-qty {
        margin-bottom: 10px;
    }
  
    .cart-remove {
        width: 100%;
        text-align: right; /* icon xóa về bên phải */
    }
}
