/*
Theme Name: Flatsome Child
Description: This is a child theme for Flatsome Theme
Author: UX Themes
Template: flatsome
Version: 3.0
*/

/*************** ADD CUSTOM CSS HERE.   ***************/


@media only screen and (max-width: 48em) {
/*************** ADD MOBILE ONLY CSS HERE  ***************/


}

	.woocommerce .cart_totals .cart-subtotal,
	.woocommerce .cart_totals .woocommerce-shipping-totals,
	.cart_totals th.product-name,
    /* Ẩn dòng phí gốc của WooCommerce để tránh hiển thị 2 lần */
    .woocommerce-cart-form .cart-collaterals .cart_totals .fee { 
		display: none !important; 
	}
	.product-trustbadge {
		text-align:center;
		padding: 0 10px 20px;
	}
	/* CSS toàn bộ giỏ hàng */
	.woocommerce-cart-form {
		margin-bottom: 20px;
	}

	.shop_table {
		border: none !important;
		margin-top: 0;
	}

	.shop_table thead {
		background: #f7f7f7;
	}

	/* CSS cho Freeship */
	.freeship-progress-container {
		margin-bottom: 20px;
		padding: 15px;
		border-radius: 4px;
		background-color: #fff;
		border: 1px solid #eee;
	}

	.freeship-progress {
		display: flex;
		align-items: center;
		gap: 10px;
		margin-bottom: 10px;
	}

	.progress-bar {
		flex: 1;
		background-color: #E9ECEF;
		height: 6px;
		border-radius: 3px;
		overflow: hidden;
	}

	.progress-fill {
		height: 100%;
		background-color: #4CAF50;
		border-radius: 3px;
		transition: width 0.3s ease;
	}

	.progress-text {
		font-size: 14px;
		color: #4CAF50;
		font-weight: bold;
		min-width: 40px;
		text-align: right;
	}

	.freeship-message {
		font-size: 14px;
		color: #666;
	}

	.freeship-success {
		color: #4CAF50;
		font-weight: bold;
	}

	.hidden {
		display: none;
	}
	
	/* --- CSS CHO SIDEBAR GIỎ HÀNG MỚI --- */
	.cart-sidebar-new {
		background-color: #f8f8f8;
		border: 1px solid #e9e9e9;
		border-radius: 8px;
		overflow: hidden;
	}

	.cart-totals-header {
		background-color: var(--primary-color); /* Màu xanh teal */
		padding: 15px;
	}

	.cart-totals-header h4 {
		color: white;
		font-weight: bold;
		text-align: left;
		margin: 0;
		font-size: 16px;
		text-transform: none;
	}

	.cart-totals-body {
		padding: 15px 20px;
	}

	.total-row {
		display: flex;
		justify-content: space-between;
		align-items: center;
		padding: 12px 0;
		font-size: 14px;
		border-bottom: 1px solid #eee;
	}

	.total-row:last-of-type {
		border-bottom: none;
	}

	.total-row .label {
		color: #555;
	}

	.total-row .value {
		font-weight: bold;
		color: #333;
	}

	.total-row .discount-value,
	.grand-total .value .woocommerce-Price-amount {
		color: #e53935; /* Màu đỏ cho giảm giá và tổng tiền */
	}

    /* CSS cho văn bản miễn phí vận chuyển */
    .free-shipping-text {
        color: #4CAF50; /* Màu xanh lá cây */
        font-weight: bold;
    }

	.grand-total {
		padding-top: 15px;
		margin-top: 5px;
		border-top: 1px solid #eee;
		border-bottom: none;
	}
	.grand-total .label,
	.grand-total .value {
		font-size: 16px;
		font-weight: bold;
	}

	.coupon-label-row {
		border-bottom: none;
		padding-bottom: 5px;
	}

	.coupon-form-wrapper {
		margin-bottom: 15px;
	}

	.coupon-form-wrapper .coupon {
		display: flex;
		overflow: hidden;
		flex-wrap: wrap;
		font-size: 13px;
	}

	.coupon-form-wrapper .input-text {
		flex-grow: 1;
		border: none;
		padding: 10px 15px;
		background-color: white;
		height: auto;
		box-shadow: none;
		margin: 0;
		width:60%;
		border-radius: 50px 0 0 50px;
		
	}
	.coupon-form-wrapper .input-text:focus {
		box-shadow: none;
		outline: none;
	}

	.coupon-form-wrapper .button {
		background-color: var(--primary-color); /* Màu xanh dương sáng */
		color: white;
		border: none;
		border-radius: 0;
		padding: 10px 15px;
		font-weight: bold;
		text-transform: uppercase;
		white-space: nowrap;
		height: auto;
		line-height: normal;
		margin: 0 !important;
		width: 40%;
		border-radius:0 50px 50px 0;
		font-size: 13px;
	}

	.checkout-button-wrapper {
		padding: 0 20px;
	}

	.checkout-button.button.primary {
		width: 100%;
		background-color: #2c2c2c !important; /* Màu đen/xám đậm */
		border-radius: 50px;
		font-weight: bold;
		font-size: 16px;
		text-transform: none;
	}

	/* Ẩn các tiêu đề và phần không cần thiết khác */
	.cart-collaterals .cart_totals h2 {
		display: none;
	}

	/* --- FIX CHO THÔNG BÁO LỖI MÃ GIẢM GIÁ --- */
	.woocommerce-cart-form .woocommerce-error,
    .woocommerce-cart-form .woocommerce-message {
		/* Ép thông báo chiếm 100% chiều rộng để nó tự xuống dòng */
		width: 100%;
		flex-basis: 100%;
		
		/* Thêm khoảng cách với ô nhập liệu */
		margin: 15px auto !important;
		
		/* Căn chỉnh lại nội dung bên trong cho đẹp */
		text-align: left;
		padding: 1em 2em 1em 3.5em !important;
		border-radius: 4px;
	}

	.woocommerce-cart-form .woocommerce-error li,
    .woocommerce-cart-form .woocommerce-message li {
		list-style: none !important;
		padding-left: 0 !important;
	}
	.woocommerce-cart-form .woocommerce-error::before,
    .woocommerce-cart-form .woocommerce-message::before {
		top: 1.3em;
		left: 1.5em;
	}
form.woocommerce-cart-form .product-thumbnail a {
    display: block;        
    width: 100%;           
    aspect-ratio: 5 / 6;   
    overflow: hidden;     
    border-radius: 6px;    
    background-color: #f5f5f5; 
}

form.woocommerce-cart-form .product-thumbnail a img {
    width: 100%;           
    height: 100%;          
    object-fit: cover;     
    object-position: center; 
    transition: transform 0.3s ease; 
}

