/* WEB366 Combo Product — bộ chọn combo. Chỉ load khi bộ chọn render. */

.web366-cpw-selector [hidden] {
	display: none !important;
}

.web366-cpw-selector__form {
	margin: 0 0 1.5em;
}

.web366-cpw-selector__component {
	margin: 0 0 1em;
	padding: 0 0 1em;
	border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.web366-cpw-selector__component-head {
	margin: 0 0 0.5em;
}

.web366-cpw-selector__component-name {
	font-weight: 600;
}

.web366-cpw-selector__component-rule {
	margin-left: 0.35em;
	opacity: 0.7;
	font-size: 0.9em;
}

.web366-cpw-selector__line {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin: 0 0 8px;
}

/* Theme hay đặt select/input rộng 100% và có margin-bottom: trong dòng lựa chọn thì bỏ. */
.web366-cpw-selector .web366-cpw-selector__line select {
	flex: 1 1 220px;
	width: auto;
	max-width: 420px;
	margin: 0;
}

.web366-cpw-selector .web366-cpw-selector__line input.web366-cpw-selector__qty {
	width: 72px;
	max-width: 72px;
	margin: 0;
	text-align: center;
}

.web366-cpw-selector__item-label {
	flex: 1 1 220px;
	max-width: 420px;
}

.web366-cpw-selector__line-price {
	font-size: 0.9em;
	white-space: nowrap;
}

.web366-cpw-selector__line-price del {
	opacity: 0.6;
}

.web366-cpw-selector__line-price ins {
	text-decoration: none;
	font-weight: 600;
}

.web366-cpw-selector .web366-cpw-selector__remove-line {
	min-height: 0;
	margin: 0;
	padding: 0 8px;
	border: 0;
	background: none;
	color: inherit;
	font-size: 1.25em;
	line-height: 1.5;
	cursor: pointer;
	opacity: 0.6;
}

.web366-cpw-selector .web366-cpw-selector__remove-line:hover {
	opacity: 1;
}

.web366-cpw-selector .web366-cpw-selector__add-line {
	min-height: 0;
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
	color: inherit;
	font-size: 0.9em;
	text-decoration: underline;
	text-transform: none;
	cursor: pointer;
}

.web366-cpw-selector__component-error,
.web366-cpw-selector__notice {
	margin: 0.5em 0 0;
	color: #b32d2e;
	font-size: 0.9em;
}

.web366-cpw-selector__component.is-invalid select,
.web366-cpw-selector__component.is-invalid input.web366-cpw-selector__qty {
	border-color: #b32d2e;
}

.web366-cpw-selector__gifts {
	margin: 0 0 1em;
}

.web366-cpw-selector__gifts-title {
	font-weight: 600;
}

.web366-cpw-selector .web366-cpw-selector__gift-list {
	margin: 0.25em 0 0 1.25em;
	padding: 0;
}

.web366-cpw-selector__gift.is-out {
	opacity: 0.6;
	text-decoration: line-through;
}

.web366-cpw-selector__gift.is-out em {
	text-decoration: none;
}

.web366-cpw-selector__summary {
	margin: 0 0 1em;
	padding: 0.75em 0 0;
}

.web366-cpw-selector__summary-row {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 6px;
	margin: 0 0 0.25em;
}

.web366-cpw-selector__regular {
	opacity: 0.6;
}

.web366-cpw-selector__price {
	font-size: 1.2em;
}

.web366-cpw-selector__save,
.web366-cpw-price__save {
	display: inline-block;
	padding: 1px 8px;
	border-radius: 3px;
	background: #e7f5ea;
	color: #1e7e34;
	font-size: 0.85em;
	font-weight: 600;
}

.web366-cpw-selector__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
}

.web366-cpw-selector__actions .single_add_to_cart_button[disabled] {
	opacity: 0.5;
	cursor: not-allowed;
}

/* Giỏ hàng, mini-cart, review checkout: dòng con thụt lề dưới dòng combo. */

/* "table.shop_table" để thắng rule padding ô bảng chung của theme (vd ".woocommerce-page table.shop_table td"). */
table.shop_table tr.web366-cpw-cart-child td.product-name {
	position: relative;
	padding-left: 48px;
}

table.shop_table tr.web366-cpw-cart-child td.product-name::before {
	content: "\21B3";
	position: absolute;
	top: 50%;
	left: 20px;
	transform: translateY(-50%);
	font-size: 1.2em;
	opacity: 0.5;
}

table.shop_table tr.web366-cpw-cart-child td.product-thumbnail {
	text-align: right;
}

table.shop_table tr.web366-cpw-cart-child td.product-thumbnail img {
	max-width: 48px;
}

table.shop_table tr.web366-cpw-cart-child td {
	font-size: 0.9em;
}

li.web366-cpw-cart-child {
	padding-left: 24px;
	border-left: 3px solid rgba(0, 0, 0, 0.08);
	font-size: 0.9em;
}

.web366-cpw-cart-ref del {
	opacity: 0.6;
}

.web366-cpw-cart-ref ins {
	text-decoration: none;
}

.web366-cpw-cart-ref__note {
	display: inline-block;
	opacity: 0.7;
	font-size: 0.85em;
	font-weight: normal;
}

/*
 * Cart / Checkout / Mini-cart Blocks. Class dòng do cpw-cart-blocks.js gắn qua filter cartItemClass;
 * chỉ dựa trên class chuẩn của WooCommerce Blocks nên không phụ thuộc theme.
 */
.web366-cpw-cart-child .wc-block-components-product-name::before {
	content: "\21B3\00a0";
	opacity: 0.5;
}

.wc-block-cart-items__row.web366-cpw-cart-child .wc-block-cart-item__image {
	text-align: end;
}

.wc-block-cart-items__row.web366-cpw-cart-child .wc-block-cart-item__image img {
	display: inline-block;
	max-width: 48px;
}

.web366-cpw-cart-child .wc-block-cart-item__wrap,
.web366-cpw-cart-child .wc-block-components-order-summary-item__description {
	font-size: 0.9em;
}

/* Giá 0đ của dòng con: chỉ hiện giá tham khảo đặt trong format giá. */
.web366-cpw-cart-child .wc-block-components-product-price__value {
	display: none;
}

/* Đang sửa combo từ giỏ hàng. */
.web366-cpw-selector__editing {
	margin: 0 0 1em;
	padding: 0.6em 0.9em;
	border-inline-start: 3px solid currentColor;
	background: rgba(0, 0, 0, 0.04);
}

.web366-cpw-cart-edit {
	white-space: nowrap;
}

/* Chọn biến thể bằng nút: <select> vẫn gửi dữ liệu nhưng ẩn khỏi màn hình, các nút nằm một hàng riêng. */
.web366-cpw-selector--swatches .web366-cpw-selector__line select.web366-cpw-selector__item {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	border: 0;
	opacity: 0;
	pointer-events: none;
}

.web366-cpw-selector__pills {
	display: flex;
	flex: 0 0 100%;
	flex-wrap: wrap;
	gap: 8px;
}

.web366-cpw-selector .web366-cpw-selector__pill {
	min-width: 56px;
	min-height: 36px;
	margin: 0;
	padding: 0 12px;
	border: 1px solid #cbd5e1;
	border-radius: 6px;
	background: #fff;
	color: inherit;
	font-size: 14px;
	font-weight: 600;
	line-height: 1;
	cursor: pointer;
	transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.web366-cpw-selector .web366-cpw-selector__pill:hover:not(:disabled) {
	border-color: #94a3b8;
}

.web366-cpw-selector .web366-cpw-selector__pill.is-active {
	border-color: currentColor;
	background: #0b8fd1;
	color: #fff;
}

.web366-cpw-selector .web366-cpw-selector__pill:disabled {
	opacity: 0.45;
	text-decoration: line-through;
	cursor: not-allowed;
}

.web366-cpw-selector--swatches .web366-cpw-selector__line-price {
	margin-left: auto;
}

/* Trang combo: ẩn khung giá "Từ ... Tiết kiệm ..." của theme (theme tbay_store: .price-box; theme chuẩn WooCommerce: p.price), đã có "Giá combo" trong bộ chọn. */
.product-type-web366_combo > .summary > .price-box,
.product-type-web366_combo > .summary > p.price,
.product-type-web366_combo > .summary > .price {
	display: none;
}

/* Giá chưa giảm (giá lẻ) luôn gạch ngang; theme hay đặt del { text-decoration: none }. */
.web366-cpw-selector del,
.web366-cpw-selector del .amount,
.web366-cpw-selector .web366-cpw-selector__regular {
	text-decoration: line-through;
}

/* Trong danh sách sản phẩm: giá combo trình bày như sản phẩm thường, không hiện nhãn "Tiết kiệm". */
.product-box .web366-cpw-price__save,
.products .product .web366-cpw-price__save {
	display: none;
}
