/* 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;
}

/*
 * Form biến thể WooCommerce (div.variations_form > table.variations) trong từng dòng. Giao diện từng thuộc tính
 * (ô chọn, màu, ảnh, nhãn) do WooCommerce hoặc plugin swatch quyết định; ở đây chỉ gỡ bố cục bảng/margin của theme.
 */
.web366-cpw-selector .web366-cpw-selector__line--variable {
	align-items: flex-start;
}

.web366-cpw-selector .web366-cpw-selector__variation {
	flex: 0 1 auto;
	min-width: min(220px, 100%);
	max-width: 100%;
}

/* Số lượng / giá / nút xoá thẳng hàng với dòng đầu của form biến thể. */
.web366-cpw-selector .web366-cpw-selector__line--variable input.web366-cpw-selector__qty,
.web366-cpw-selector .web366-cpw-selector__line--variable .web366-cpw-selector__line-price,
.web366-cpw-selector .web366-cpw-selector__line--variable button.web366-cpw-selector__remove-line {
	margin-top: 1.6em;
}

.web366-cpw-selector .web366-cpw-selector__variation table.variations {
	width: 100%;
	margin: 0;
	border: 0;
	background: none;
}

.web366-cpw-selector .web366-cpw-selector__variation table.variations tbody,
.web366-cpw-selector .web366-cpw-selector__variation table.variations tr,
.web366-cpw-selector .web366-cpw-selector__variation table.variations th,
.web366-cpw-selector .web366-cpw-selector__variation table.variations td {
	display: block;
	padding: 0;
	border: 0;
	background: none;
	text-align: start;
}

.web366-cpw-selector .web366-cpw-selector__variation table.variations tr {
	margin: 0 0 0.5em;
}

.web366-cpw-selector .web366-cpw-selector__variation table.variations th.label {
	margin: 0 0 0.25em;
	font-size: 0.9em;
	font-weight: 600;
}

/* Ô chọn dạng dropdown (khi không có plugin swatch hoặc thuộc tính để kiểu mặc định). */
.web366-cpw-selector .web366-cpw-selector__variation select {
	width: 100%;
	max-width: 420px;
	margin: 0;
}

.web366-cpw-selector .web366-cpw-selector__variation .reset_variations {
	visibility: hidden;
	margin-inline-start: 8px;
	font-size: 0.85em;
}

.web366-cpw-selector .web366-cpw-selector__variation .single_variation:empty {
	display: none;
}

.web366-cpw-selector .web366-cpw-selector__variation .single_variation {
	font-size: 0.85em;
}

.web366-cpw-selector .web366-cpw-selector__variation .single_variation p {
	margin: 0;
}

.web366-cpw-selector .web366-cpw-selector__variation .woocommerce-variation-description:empty,
.web366-cpw-selector .web366-cpw-selector__variation .woocommerce-variation-price:empty,
.web366-cpw-selector .web366-cpw-selector__variation .woocommerce-variation-availability:empty {
	display: none;
}

.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;
}
