/* =========================================================
   3. GIỎ HÀNG
   ========================================================= */


/* ==============================
   TRANG GIỎ HÀNG
   ============================== */

.cart-page {
    max-width: 1800px;
    margin: auto;
    padding: 60px 20px;
}


.cart-page > h2 {
    text-align: center;
    font-size: 32px;
    margin-bottom: 40px;
}


/* ==============================
   DANH SÁCH GIỎ HÀNG
   ============================== */

.cart-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}


/* ==============================
   TIÊU ĐỀ GIỎ HÀNG
   ============================== */

.cart-header {
    display: grid;
    grid-template-columns:
        3fr 1fr 1fr 1fr 1fr;
    background: white;
    border-radius: 8px;
    box-shadow:
        0 2px 8px rgba(0,0,0,0.08);
    overflow: hidden;
    font-size: 14px;
}

.cart-header div {
    padding: 13px;
    text-align: center;
    font-weight: bold;
    border-right: 1px solid #e5e7eb;
}

.cart-header div:first-child {
    text-align: left;
}

.cart-header div:last-child {
    border-right: none;
}


/* ==============================
   TỪNG SẢN PHẨM TRONG GIỎ
   ============================== */

.cart-item {
    display: grid;
    grid-template-columns:
        3fr 1fr 1fr 1fr 1fr;
    background: white;
    border-radius: 8px;
    box-shadow:
        0 2px 8px rgba(0,0,0,0.08);
    overflow: hidden;
    font-size: 14px;
}


/* ==============================
   CÁC Ô TRONG SẢN PHẨM
   ============================== */

.cart-item > div {
    padding: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    border-right: 1px solid #eeeeee;
}

.cart-item > div:first-child {
    justify-content: flex-start;
    align-items: flex-start !important;
    text-align: left;
}

.cart-item > div:last-child {
    border-right: none;
}


/* ==============================
   THÔNG TIN SẢN PHẨM
   ============================== */

.cart-product-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    text-align: left !important;
}


.cart-product-info h3 {
    margin: 0 0 6px 0;
    font-size: 15px;
}


.cart-product-info p {
    color: #666;
    margin: 0;
    font-size: 13px;
}


.cart-product-info h3,
.cart-product-info p {
    text-align: left !important;
}


/* ==============================
   SỐ LƯỢNG
   ============================== */

.cart-quantity {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-weight: bold;
}


/* ==============================
   NÚT + VÀ -
   ============================== */

.quantity-button {
    width: 28px;
    height: 28px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 5px;
    cursor: pointer;
    font-size: 17px;
    line-height: 1;
}


.quantity-button:hover {
    background: #f2f2f2;
}


/* ==============================
   SỐ LƯỢNG HIỂN THỊ
   ============================== */

.quantity-number {
    min-width: 20px;
    text-align: center;
    font-weight: bold;
}


/* ==============================
   ĐƠN GIÁ
   ============================== */

.cart-price {
    font-weight: bold;
}


/* ==============================
   THÀNH TIỀN
   ============================== */

.cart-item-total {
    color: #dc2626 !important;
    font-weight: bold;
}

/* ==============================
   NÚT XÓA SẢN PHẨM
   ============================== */

.cart-remove {
    color: #dc2626;
}

.remove-button {
    padding: 6px 12px;
    background: white;
    color: #dc2626;
    border: 1px solid #dc2626;
    border-radius: 5px;
    cursor: pointer;
    font-size: 13px;
}

.remove-button:hover {
    background: #dc2626;
    color: white;
}


/* ==============================
   GIỎ HÀNG TRỐNG
   ============================== */

.cart-empty {
    background: white;
    padding: 40px;
    text-align: center;
    border-radius: 10px;
    color: #666;
    font-size: 14px;
}


/* ==============================
   TỔNG TIỀN
   ============================== */

.cart-total {
    margin-top: 20px;
    padding: 30px;
    background: white;
    border-radius: 10px;
    text-align: right;
    font-size: 22px;
    font-weight: 500;
    
}

/* ==============================
   CÁC NÚT TRONG GIỎ HÀNG
   ============================== */

.cart-actions {
    margin-top: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}



/* ==================================================
   HAI NÚT RIÊNG BIỆT TRONG GIỎ HÀNG
   ================================================== */

.continue-shopping-button,
.order-button {
    width: 240px;
    min-height: 50px;
    box-sizing: border-box;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 12px 16px;
    border-radius: 6px;

    font-family: inherit;
    font-size: 15px;
    font-weight: bold;
    line-height: 1.4;
    text-align: center;

    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

/* NÚT TIẾP TỤC MUA HÀNG */
.continue-shopping-button {
    background: #ffffff;
    color: #1f2937;
    border: 1px solid #cccccc;
}

.continue-shopping-button:hover {
    background: #f3f4f6;
    transform: translateY(-1px);
}

/* NÚT GỬI YÊU CẦU ĐẶT HÀNG */
.order-button {
    background: #0068ff;
    color: #ffffff;
    border: 1px solid #0068ff;
}

.order-button:hover {
    background: #0054d6;
    border-color: #0054d6;
    transform: translateY(-1px);
}

/* ĐIỆN THOẠI */
@media (max-width: 700px) {
    .continue-shopping-button,
    .order-button {
        width: 100%;
        min-height: 48px;
        padding: 12px;
        font-size: 14px;
    }
}




/* =========================================================
   NÚT TIẾN HÀNH ĐẶT HÀNG
   ========================================================= */

.cart-action {
    margin-top: 15px;
    text-align: right;
}

#checkoutButton {
    padding: 13px 25px;
    background: #0068ff;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
}

#checkoutButton:hover {
    background: #1f2937;
}



/* ==============================
   GIAO DIỆN GIỎ HÀNG TRÊN ĐIỆN THOẠI
   ============================== */

@media (max-width: 700px) {

    .cart-page {
        padding: 30px 12px;
    }

    .cart-page > h2 {
        font-size: 26px;
        margin-bottom: 24px;
    }

    /* Thu gọn bảng tiêu đề và các dòng sản phẩm */
    .cart-header,
    .cart-item {
        grid-template-columns:
            minmax(0, 2fr)
            minmax(75px, 1fr)
            minmax(80px, 1fr)
            minmax(90px, 1.2fr)
            minmax(55px, 0.7fr);
        font-size: 12px;
    }

    .cart-header div {
        padding: 10px 3px;
        overflow-wrap: anywhere;
    }

    .cart-item > div {
        padding: 12px 4px;
        min-width: 0;
        overflow-wrap: anywhere;
    }

    .cart-product-info h3 {
        font-size: 13px;
        line-height: 1.4;
        overflow-wrap: anywhere;
    }

    .cart-product-info p {
        font-size: 11px;
        overflow-wrap: anywhere;
    }

    .cart-quantity {
        gap: 3px;
        flex-wrap: wrap;
    }

    .quantity-button {
        width: 26px;
        height: 28px;
        flex-shrink: 0;
    }

    .quantity-number {
        min-width: 16px;
    }

    .cart-price,
    .cart-item-total {
        font-size: 12px;
    }

    .remove-button {
        padding: 6px 5px;
        font-size: 11px;
    }

    /* Tổng tiền */
    .cart-total {
        padding: 20px 14px;
        font-size: 18px;
    }

    /* Các nút thao tác */
    .cart-action {
        display: flex;
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }

    .continue-shopping-button,
    .order-button {
        width: 100%;
        padding: 13px 12px;
        font-size: 14px;
    }
}

/* ==============================
   ĐIỆN THOẠI MÀN HÌNH RẤT NHỎ
   ============================== */

@media (max-width: 400px) {

    .cart-page {
        padding-left: 8px;
        padding-right: 8px;
    }

    .cart-header,
    .cart-item {
        grid-template-columns:
            minmax(0, 1.7fr)
            minmax(65px, 0.9fr)
            minmax(68px, 1fr)
            minmax(75px, 1.1fr)
            minmax(48px, 0.65fr);
        font-size: 10px;
    }

    .cart-header div {
        padding: 8px 2px;
    }

    .cart-item > div {
        padding: 10px 2px;
    }

    .cart-product-info h3 {
        font-size: 12px;
    }

    .cart-price,
    .cart-item-total {
        font-size: 10px;
    }

    .quantity-button {
        width: 23px;
        height: 26px;
        font-size: 15px;
    }

    .remove-button {
        padding: 5px 3px;
        font-size: 10px;
    }
}


/* SẢN PHẨM TRONG ĐƠN= */

.order-product {
    display: grid;
    grid-template-columns: 3fr 1fr 1fr 1fr;
    gap: 10px;
    padding: 15px 0;
    border-bottom: 1px solid #eeeeee;
    text-align: center;
    align-items: center;
}

.order-product-info {
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.order-product-info span {
    color: #666;
    font-size: 13px;
}

/* TỔNG TIỀN */

.order-total {
    margin-top: 20px;
    text-align: right;
    font-size: 20px;
}

.order-total strong {color: #dc2626;}

.order-total p {
    margin-top: 8px;
    color: #666;
    font-size: 13px;
}



.top-section {
    background:
        radial-gradient(
            circle at 85% 20%,
            rgba(37, 99, 235, 0.35),
            transparent 35%
        ),
        linear-gradient(
            120deg,
            #172b46 55%,
            #111827 100%
        );
}

header {
    
    background: 
        radial-gradient(
            circle at 85% 20%,
            rgba(37, 99, 235, 0.35),
            transparent 35%
        ),
        linear-gradient(
        120deg,
        
        #172b46 55%,
        #111827 100%
    );

    color: white;
    padding: 20px 60px;
    display: flex;
    justify-content: space-between;
    align-items: center;

}