/* ==========================================================================
   CART UI STYLES (GIO HANG - FIGMA 2539:90612)
   Flatsome Child Theme - thuyannhung.com
   ========================================================================== */

/* 1. Header Banner & Steps */
.tan-cart-banner {
    background: #0e9494;
    padding: 32px 0 30px;
    color: #ffffff;
    margin-bottom: 0;
}

.tan-cart-banner .container {
    max-width: 1230px;
    margin: 0 auto;
    padding: 0 15px;
}

.tan-cart-banner-title {
    color: #ffffff;
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 6px;
    line-height: 1.2;
    font-family: 'Be Vietnam Pro', sans-serif;
}

.tan-cart-banner-breadcrumb {
    font-size: 13.5px;
    color: rgba(255, 255, 255, 0.85);
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Be Vietnam Pro', sans-serif;
}

.tan-cart-banner-breadcrumb a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    transition: color 0.2s;
}

.tan-cart-banner-breadcrumb a:hover {
    color: #ffffff;
    text-decoration: underline;
}

.tan-cart-banner-breadcrumb .divider {
    color: rgba(255, 255, 255, 0.6);
    font-size: 12px;
}

.checkout-page-title {
    background: #ffffff;
    border-bottom: none;
    margin-bottom: 15px;
}

.page-checkout .message-wrapper {
    padding-bottom: 0;
    text-align: center;
    margin-bottom: 15px;
}

.tan-checkout-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-family: 'Be Vietnam Pro', sans-serif;
    font-size: 15px;
}

.tan-checkout-steps .step-item {
    color: #8c979a !important;
    text-decoration: none !important;
    font-weight: 500 !important;
    transition: color 0.2s;
}

.tan-checkout-steps .step-item:hover {
    color: #0e9494 !important;
}

.tan-checkout-steps .step-item.active,
.tan-checkout-steps .step-item.current {
    color: #232a2c !important;
    font-weight: 700 !important;
}

.tan-checkout-steps .step-item.pending {
    color: #b0babd !important;
    pointer-events: none !important;
    cursor: default !important;
}

.tan-checkout-steps .step-divider {
    color: #b0babd;
    font-size: 13px;
}

.page-checkout .woocommerce,
.woocommerce-cart .page-wrapper {
    max-width: 1230px;
    margin: 0 auto;
    padding-top: 0;
}

.tan-cart-grid {
    margin-top: 0;
}

.tan-cart-grid.row-divided>.col+.col,
.tan-cart-grid>.col+.col {
    border-left: none !important;
}

.tan-cart-grid>.col {
    padding-left: 15px !important;
    padding-right: 15px !important;
}

.woocommerce-cart-form {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin-bottom: 30px;
}

/* 2. Khung bang san pham */
.tan-cart-table-card {
    background: #ffffff;
    border-radius: 14px;
    border: 1px solid #e9edef;
    box-shadow: 0 6px 22px 0 rgba(20, 45, 45, 0.06);
    overflow: hidden;
    margin-bottom: 25px;
}

.tan-cart-table-card .cart-wrapper {
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
}

.tan-cart-table {
    border: none !important;
    margin: 0 !important;
    width: 100% !important;
    border-collapse: collapse;
    background: transparent;
    box-shadow: none !important;
}

.tan-cart-table thead {
    background: #f8fafb;
    border-bottom: 1px solid #e9edef;
}

.tan-cart-table thead th {
    background: #f8fafb;
    color: #5a6669;
    font-size: 12.5px;
    font-weight: 700;
    padding: 14px 14px;
    border: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tan-cart-table tbody td {
    padding: 18px 14px;
    vertical-align: middle;
    border-bottom: 1px solid #f0f3f4;
    border-top: none;
}

.tan-cart-table tbody tr:last-child td {
    border-bottom: none;
}

.tan-cart-product-flex {
    display: flex;
    align-items: center;
    gap: 14px;
}

.tan-cart-product-thumb {
    width: 64px;
    height: 64px;
    min-width: 64px;
    min-height: 64px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
    background: #f5f7f8;
    border: 1px solid #edf1f2;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tan-cart-product-thumb img {
    width: 64px !important;
    height: 64px !important;
    max-width: 64px !important;
    max-height: 64px !important;
    object-fit: cover;
    display: block;
}

.tan-cart-product-name {
    flex: 1 1 auto;
    min-width: 0;
}

.tan-cart-product-name a,
.tan-cart-table td.product-name a,
.woocommerce-cart-form .product-name a {
    font-size: 14.5px;
    font-weight: 600;
    color: #232a2c;
    text-decoration: none !important;
    border-bottom: none !important;
    box-shadow: none !important;
    line-height: 1.45;
    transition: color 0.2s;
    display: block;
}

.tan-cart-product-name a:hover,
.tan-cart-table td.product-name a:hover,
.woocommerce-cart-form .product-name a:hover {
    color: #0e9494 !important;
    text-decoration: none !important;
    border-bottom: none !important;
}

.tan-cart-table .product-price {
    font-size: 14.5px;
    font-weight: 600;
    color: #232a2c;
}

.tan-cart-table .product-subtotal {
    font-size: 15px;
    font-weight: 700;
    color: #232a2c;
    line-height: 1.2;
}

.tan-cart-table .product-remove {
    width: 36px;
    text-align: center;
}

.tan-cart-table a.remove,
.tan-cart-table a.remove.tan-remove-item {
    display: inline-block !important;
    width: auto !important;
    height: auto !important;
    border: none !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    color: #8c979a !important;
    font-size: 22px !important;
    font-weight: 300 !important;
    line-height: 1 !important;
    text-decoration: none !important;
    padding: 0 !important;
    margin: 0 auto !important;
    transition: all 0.2s ease !important;
}

.tan-cart-table a.remove:hover,
.tan-cart-table a.remove.tan-remove-item:hover {
    color: #e31e24 !important;
    background: transparent !important;
    transform: scale(1.2) !important;
}

.tan-cart-table .quantity {
    display: inline-flex;
    align-items: center;
    border: 1px solid #e2e8ea;
    border-radius: 8px;
    overflow: hidden;
    background: #ffffff;
    margin: 0 auto;
}

.tan-cart-table .quantity input.qty {
    width: 42px;
    height: 34px;
    border: none;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    color: #232a2c;
    background: transparent;
    box-shadow: none;
    padding: 0;
    margin: 0;
}

.tan-cart-table .quantity .button {
    width: 30px;
    height: 34px;
    padding: 0;
    margin: 0;
    border: none;
    background: #f5f7f8;
    color: #495356;
    font-size: 14px;
    line-height: 34px;
    transition: background 0.2s;
    cursor: pointer;
}

.tan-cart-table .quantity .button:hover {
    background: #e8edf0;
    color: #0e9494;
}

/* 3. Cac nut hanh dong ben duoi bang */
.tan-cart-bottom-buttons {
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 0;
}

.tan-btn-continue-shopping {
    display: inline-flex;
    align-items: center;
    height: 38px;
    padding: 0 20px;
    border: 1px solid #dbe2e4;
    background: #ffffff;
    color: #384043;
    font-size: 13.5px;
    font-weight: 600;
    border-radius: 999px;
    text-decoration: none;
    transition: all 0.2s;
}

.tan-btn-continue-shopping:hover {
    border-color: #0e9494;
    color: #0e9494;
    background: #f6fbfc;
}

.tan-cart-grid .tan-cart-bottom-buttons .tan-btn-update-cart {
    height: 38px !important;
    padding: 0 22px !important;
    border: 1px solid #dbe2e4 !important;
    background: #ffffff !important;
    color: #384043 !important;
    font-size: 13.5px !important;
    font-weight: 600 !important;
    border-radius: 999px !important;
    cursor: pointer;
    transition: all 0.2s;
    margin: 0 !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    opacity: 1;
}

.tan-btn-update-cart:hover {
    border-color: #0e9494 !important;
    color: #0e9494 !important;
    background: #f6fbfc !important;
}

.continue-shopping,
.button-continue-shopping {
    display: none !important;
}

/* 4. Khung Tong cong gio hang (Sidebar ben phai) */
.cart-collaterals .cart-sidebar {
    background: #ffffff;
    border-radius: 14px;
    border: 1px solid #e9edef;
    box-shadow: 0 6px 22px 0 rgba(20, 45, 45, 0.06);
    padding: 26px 28px;
    position: sticky;
    top: 20px;
}

.cart-collaterals .cart_totals th.product-name {
    border: none;
}

.tan-cart-totals-title,
.cart_totals h2,
.cart-sidebar .widget-title {
    text-transform: none !important;
    font-size: 18px !important;
    font-weight: 700 !important;
    color: #232a2c !important;
    margin: 0 0 16px !important;
    padding-bottom: 0 !important;
    border-bottom: none !important;
    text-align: left !important;
    letter-spacing: 0 !important;
}

.tan-totals-table {
    width: 100%;
    border: none;
    margin: 0 0 16px;
    border-collapse: collapse;
}

.tan-totals-table th {
    font-size: 14px;
    font-weight: 500;
    color: #5c686b;
    padding: 10px 0;
    border-bottom: 1px solid #f0f3f4;
    border-top: none;
    text-align: left;
}

.tan-totals-table td {
    font-size: 14.5px;
    font-weight: 600;
    color: #232a2c;
    padding: 10px 0;
    border-bottom: 1px solid #f0f3f4;
    border-top: none;
    text-align: right;
}

.tan-shipping-calc-text {
    font-weight: 400 !important;
    color: #8c979a !important;
    font-size: 13.5px;
}

.tan-order-total-row th {
    font-size: 16px !important;
    font-weight: 700 !important;
    color: #232a2c !important;
    padding: 14px 0 !important;
    border-bottom: none !important;
}

.tan-order-total-row td,
.tan-order-total-row td .amount,
.tan-order-total-row td span.amount,
.tan-order-total-row td strong {
    font-size: 20px !important;
    font-weight: 800 !important;
    color: #e31e24 !important;
    padding: 14px 0 !important;
    border-bottom: none !important;
}

/* 5. Khung Coupon */
.tan-cart-coupon-form {
    margin: 18px 0 16px !important;
    width: 100% !important;
}

.tan-coupon-group {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 10px !important;
    width: 100% !important;
}

.tan-coupon-input {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    width: 100% !important;
    height: 42px !important;
    border: 1px solid #dbe2e4 !important;
    border-radius: 8px !important;
    padding: 0 14px !important;
    font-size: 13.5px !important;
    color: #232a2c !important;
    background: #ffffff !important;
    box-shadow: none !important;
    margin: 0 !important;
}

.tan-coupon-input:focus {
    border-color: #0e9494 !important;
    outline: none !important;
}

.cart_totals .tan-btn-apply-coupon,
.tan-cart-coupon-form .tan-coupon-group .tan-btn-apply-coupon {
    flex: 0 0 auto !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    height: 42px !important;
    padding: 0 22px !important;
    border: none !important;
    background: var(--fs-color-alert, #e31e24) !important;
    color: #ffffff !important;
    font-size: 13.5px !important;
    font-weight: 600 !important;
    border-radius: 999px !important;
    cursor: pointer !important;
    transition: background 0.2s, opacity 0.2s !important;
    margin: 0 !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.cart_totals .tan-btn-apply-coupon:hover,
.tan-btn-apply-coupon:hover {
    background: var(--fs-color-alert, #e31e24) !important;
    opacity: 0.9 !important;
}

/* 6. Nut Thanh toan */
.tan-checkout-action-wrap {
    margin: 0 !important;
}

.cart_totals .tan-btn-checkout,
.cart_totals .checkout-button,
a.checkout-button.tan-btn-checkout {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    height: 48px !important;
    background: #e31e24 !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 999px !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    text-transform: none !important;
    letter-spacing: 0.2px !important;
    box-shadow: 0 4px 14px rgba(227, 30, 36, 0.25) !important;
    transition: all 0.2s ease !important;
    text-decoration: none !important;
    cursor: pointer !important;
    margin: 0 !important;
}

.cart_totals .tan-btn-checkout:hover,
.cart_totals .checkout-button:hover,
a.checkout-button.tan-btn-checkout:hover {
    background: #c01318 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 6px 18px rgba(227, 30, 36, 0.32) !important;
    color: #ffffff !important;
}

/* 7. Gio hang trong (Empty Cart) */
.cart-empty {
    font-size: 16px;
    font-weight: 600;
    color: #495356;
    margin: 0 0 20px;
    padding: 36px 24px !important;
    background: #ffffff !important;
    border-radius: 14px;
    border: 1px solid #e9edef !important;
    box-shadow: 0 6px 22px 0 rgba(20, 45, 45, 0.06);
    text-align: center;
}

.return-to-shop {
    margin: 0;
    text-align: center;
}

.return-to-shop .button {
    background: #e31e24 !important;
    color: #ffffff !important;
    border-radius: 999px !important;
    padding: 12px 32px !important;
    font-size: 14.5px;
    font-weight: 700;
    border: none;
    box-shadow: 0 4px 14px rgba(227, 30, 36, 0.28);
    transition: all 0.2s;
    display: inline-block;
    text-transform: none !important;
}

.return-to-shop .button:hover {
    background: #c01318 !important;
    transform: translateY(-1px);
}

/* ==========================================================================
   8. Responsive cho Gio Hang
   ========================================================================== */
@media only screen and (max-width: 992px) {
    .cart-collaterals .cart-sidebar {
        padding: 22px 18px;
        margin-top: 20px;
    }
}

@media only screen and (max-width: 600px) {
    .tan-cart-banner {
        padding: 24px 0 20px;
    }

    .tan-cart-banner-title {
        font-size: 22px;
    }

    .tan-checkout-steps {
        font-size: 13px;
        gap: 6px;
    }

    .tan-cart-table thead {
        display: none;
    }

    .tan-cart-table tbody tr.cart_item {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        position: relative;
        padding: 14px 0;
        border-bottom: 1px solid #f0f3f4;
    }

    .tan-cart-table .product-info-td {
        width: 100%;
        padding: 0 0 10px;
    }

    .tan-cart-table .product-remove {
        position: absolute;
        top: 10px;
        right: 0;
        width: auto;
        padding: 0;
    }

    .tan-cart-table .product-price {
        display: none;
    }

    .tan-cart-table .product-quantity {
        width: 50%;
        padding: 6px 0;
        text-align: left !important;
    }

    .tan-cart-table .product-subtotal {
        width: 50%;
        padding: 6px 0;
        text-align: right !important;
    }

    .tan-cart-bottom-buttons {
        flex-direction: column;
        gap: 10px;
    }

    .tan-btn-continue-shopping,
    .tan-btn-update-cart {
        width: 100%;
        justify-content: center;
        text-align: center;
    }

    .cart_totals .tan-btn-checkout {
        height: 44px;
        font-size: 14px;
    }

    .cart-empty {
        padding: 28px 16px !important;
    }
}