/* ==========================================================================
   WooCommerce Cart Page & Quantity Stepper Styles
   ========================================================================== */

/* WooCommerce Pill-style Quantity Stepper */
.quantity.custom-qty-stepper,
.woocommerce .quantity {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    border: 1px solid #D0D5DD !important;
    border-radius: 12px !important;
    padding: 0 !important;
    background: #FFFFFF !important;
    box-sizing: border-box !important;
}

.quantity.custom-qty-stepper .qty-btn,
.woocommerce .quantity .qty-btn {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    color: #101828 !important;
    font-size: 18px !important;
    font-weight: 500 !important;
    line-height: 1 !important;
    cursor: pointer !important;
    padding: 6px 14px !important;
    margin: 0 !important;
    user-select: none !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: opacity 0.2s ease !important;
}

.quantity.custom-qty-stepper .qty-btn:hover,
.woocommerce .quantity .qty-btn:hover {
    opacity: 0.6 !important;
}

.quantity.custom-qty-stepper input.qty,
.woocommerce .quantity input.qty {
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    text-align: center !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    color: #101828 !important;
    padding: 6px 14px !important;
    margin: 0 !important;
    outline: none !important;
    -moz-appearance: textfield !important;
    max-width: 60px !important;
    height: auto !important;
}

.quantity.custom-qty-stepper input.qty::-webkit-outer-spin-button,
.quantity.custom-qty-stepper input.qty::-webkit-inner-spin-button,
.woocommerce .quantity input.qty::-webkit-outer-spin-button,
.woocommerce .quantity input.qty::-webkit-inner-spin-button {
    -webkit-appearance: none !important;
    margin: 0 !important;
}

/* Custom Remove Button SVG Icon */
.woocommerce table.shop_table td.product-remove a.remove,
.product-remove a.remove {
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: auto !important;
    height: auto !important;
    line-height: normal !important;
    color: inherit !important;
    text-decoration: none !important;
    transition: opacity 0.2s ease !important;
    position: relative !important;
}

.woocommerce a.remove::before,
.woocommerce-js a.remove::before,
.product-remove a.remove::before {
    display: none !important;
    content: none !important;
    border: none !important;
}

.product-remove a.remove:hover {
    background: transparent !important;
    opacity: 1 !important;
}

.product-remove a.remove svg {
    display: block !important;
    width: 24px !important;
    height: 24px !important;
}

.product-remove a.remove svg path {
    stroke: #000000 !important;
    transition: stroke 0.2s ease !important;
}

.product-remove a.remove:hover svg path {
    stroke: #c00 !important;
}

/* Giỏ hàng: 3 Cột nằm ngang trên cùng 1 dòng */
.woocommerce table.cart tr.woocommerce-cart-form__cart-item,
.woocommerce-cart-form__cart-item {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
    border-bottom: 1px solid #D6DBE1 !important;
    padding-top: 16px !important;
    padding-bottom: 16px !important;
    gap: 10px !important;
}

.woocommerce table.cart tr.woocommerce-cart-form__cart-item:first-child,
.woocommerce-cart-form__cart-item:first-child {
    padding-top: 0 !important;
}

/* Styling các td trong giỏ hàng */
.woocommerce table.cart tr.woocommerce-cart-form__cart-item td,
.woocommerce-cart-form__cart-item td {
    padding: 0 !important;
    border: none !important;
    background: transparent !important;
}

/* Column 1 Product Info & Attributes (Max Width 587px, Flex Row, Gap 20px) */
.woocommerce table.cart tr.woocommerce-cart-form__cart-item td.product-info,
.woocommerce table.shop_table td.product-info,
.woocommerce-cart-form td.product-info,
td.product-info {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    gap: 20px !important;
    flex: 1 1 auto !important;
    max-width: 587px !important;
    justify-content: start !important;
    text-align: left !important;
}

@media (max-width: 1024px) {
    .woocommerce table.cart tr.woocommerce-cart-form__cart-item td.product-info,
    .woocommerce table.shop_table td.product-info,
    .woocommerce-cart-form td.product-info,
    td.product-info {
        max-width: 400px !important;
    }
}

.woocommerce table.cart td.product-info .product-thumbnail,
.woocommerce table.shop_table td.product-info .product-thumbnail,
.product-info .product-thumbnail {
    flex: 0 0 160px !important;
    width: 160px !important;
    max-width: 160px !important;
    display: block !important;
}

.woocommerce table.cart td.product-info .product-thumbnail img,
.woocommerce table.shop_table td.product-info .product-thumbnail img,
.product-info .product-thumbnail img {
    width: 100% !important;
    max-width: 160px !important;
    aspect-ratio: 1 / 1 !important;
    object-fit: cover !important;
    border-radius: 20px !important;
    display: block !important;
}

.woocommerce table.cart td.product-info .product-name,
.woocommerce table.shop_table td.product-info .product-name,
.product-info .product-name {
    flex: 1 1 auto !important;
    font-size: 18px !important;
    font-weight: 700 !important;
    display: block !important;
    text-align: left !important;
}

.product-info .product-name a {
    color: #111827 !important;
    text-decoration: none !important;
}

.product-info .variation {
    margin-top: 20px !important;
    margin-bottom: 0 !important;
    font-size: 16px !important;
    font-weight: 500 !important;
    color: #6B7280 !important;
}

.product-info .variation dt {
    display: none !important;
}

.product-info .variation dd {
    display: inline-block !important;
    margin: 0 !important;
    padding: 0 !important;
}

.product-info .variation dd p {
    margin: 0 !important;
    display: inline !important;
}

/* Column 2: Đơn giá, Số lượng, Thành tiền (Flex Column, Gap 16px) */
.woocommerce table.cart tr.woocommerce-cart-form__cart-item td.product-details,
.woocommerce-cart-form td.product-details,
td.product-details,
.product-details {
    flex: 0 0 auto !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 16px !important;
    text-align: left !important;
}

.product-price,
.product-quantity,
.product-subtotal {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
}

/* Label cho Đơn giá, Số lượng, Thành tiền (Đồng bộ chiều rộng nhãn lớn nhất + gap 10px) */
.cart-item-label {
    display: inline-block !important;
    min-width: 95px !important;
    color: #111827 !important;
    font-weight: 700 !important;
    white-space: nowrap !important;
}

/* Giá trị Đơn giá */
.product-price .amount,
.product-price bdi {
    color: #6B7280 !important;
    font-weight: 400 !important;
}

/* Giá trị Thành tiền */
.product-subtotal .amount,
.product-subtotal bdi {
    color: #853F13 !important;
    font-weight: 700 !important;
}

/* Xóa viền khung bảng giỏ hàng */
.woocommerce table.shop_table,
.woocommerce-js table.shop_table,
.woocommerce table.cart,
table.shop_table {
    border: none !important;
}

.woocommerce-cart table.shop_table dl dd {
    font-weight: 500 !important;
}

body.woocommerce-cart #content .ast-container {
    padding: 60px 20px !important
}

.woocommerce-cart-title {
    color: #111827 !important;
    font-family: Roboto, sans-serif !important;
    font-size: 32px !important;
    font-style: normal !important;
    font-weight: 600 !important;
    line-height: normal !important;
    margin-bottom: 40px !important;
}

.woocommerce-cart-subtitle {
    color: #111827 !important;
    font-family: "Playfair Display", serif !important;
    font-size: 24px !important;
    font-style: normal !important;
    font-weight: 600 !important;
    line-height: normal !important;
    margin-bottom: 24px !important;
}

.woocommerce-cart .cart-collaterals .cart_totals {
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: start !important;
    gap: 30px !important;
}

.woocommerce-cart .cart-collaterals .cart_totals h2 {
    padding: 0 !important;
    margin: 0 !important;
    font-size: 24px !important;
    font-style: normal !important;
    font-weight: 600 !important;
    line-height: normal !important;
    color: #111827 !important;
    background-color: #fff !important;
    border: none !important;
}

.woocommerce-cart .cart-collaterals .cart_totals table,
.woocommerce-cart .cart-collaterals .cart_totals tr,
.woocommerce-cart .cart-collaterals .cart_totals th,
.woocommerce-cart .cart-collaterals .cart_totals td {
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
}

.woocommerce-cart .cart-collaterals .cart_totals table.shop_table {
    border-top: 1px solid #D6DBE1 !important;
    border-bottom: 1px solid #D6DBE1 !important;
    border-collapse: collapse !important;
    margin: 0 !important;
    width: 100% !important;
    height: auto !important;
}

.woocommerce-cart .cart-collaterals .cart_totals tr.cart-subtotal th,
.woocommerce-cart .cart-collaterals .cart_totals tr.cart-subtotal td {
    padding-top: 12px !important;
    padding-bottom: 6px !important;
}

.woocommerce-cart .cart-collaterals .cart_totals tr.order-total th,
.woocommerce-cart .cart-collaterals .cart_totals tr.order-total td {
    padding-top: 6px !important;
    padding-bottom: 12px !important;
}

.woocommerce-cart .wc-proceed-to-checkout {
    padding: 0 !important;
    width: 100% !important;
}

.woocommerce-cart .wc-proceed-to-checkout a.checkout-button {
    margin-bottom: 0 !important;
    padding: 14px 30px !important;
}

.woocommerce-cart .cart-collaterals .cart_totals th {
    font-weight: 400 !important;
    text-align: left !important;
}

.woocommerce-cart .cart-collaterals .cart_totals td {
    text-align: right !important;
}

.woocommerce-cart .cart-collaterals .cart_totals tr.order-total th {
    color: #111 !important;
}

.woocommerce-cart .cart-collaterals .cart_totals tr.order-total td,
.woocommerce-cart .cart-collaterals .cart_totals tr.order-total td * {
    font-weight: 600 !important;
    color: #853F13 !important;
    font-size: 20px !important;
}

.woocommerce-cart .cart-collaterals .cart_totals tr.cart-subtotal td,
.woocommerce-cart .cart-collaterals .cart_totals tr.cart-subtotal td * {
    color: #111 !important;
    font-weight: 600 !important;
}

/* Ẩn nhãn tiêu đề cột mặc định của WooCommerce trên giao diện di động */
.woocommerce-cart table.shop_table_responsive tr td::before {
    content: none !important;
}