/* Tohfe Weight Engine — UI (matches ui-v2 design tokens) */
.twe-form .twe-block {
	background: var(--th-surface, #fff);
	border: 1px solid var(--th-border, #e4ddcc);
	border-radius: 14px;
	padding: 18px 18px 16px;
	margin: 14px 0;
}
.twe-block__head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 12px;
	flex-wrap: wrap;
	margin-bottom: 12px;
}
.twe-block__title {
	font-size: 16px;
	font-weight: 800;
	color: var(--th-primary, #1d4a2e);
}
.twe-block__unit {
	font-size: 13px;
	color: var(--th-muted, #6e675a);
}
.twe-block__unit strong { color: var(--th-primary, #1d4a2e); }
.twe-stepper {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 10px;
}
.twe-stepper__btn {
	width: 46px;
	height: 46px;
	flex: none;
	border-radius: 12px;
	border: 1px solid var(--th-border, #e4ddcc);
	background: var(--th-bg, #faf7f0);
	color: var(--th-primary, #1d4a2e);
	font-size: 22px;
	font-weight: 700;
	cursor: pointer;
	transition: background .15s ease, border-color .15s ease;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}
.twe-stepper__btn:hover { background: #efe9db; border-color: #c9c2b2; }
.twe-stepper__btn:disabled { opacity: .45; cursor: not-allowed; }
.twe-stepper__value {
	flex: 1;
	text-align: center;
	background: #fffdf8;
	border: 1px solid var(--th-border, #e4ddcc);
	border-radius: 12px;
	padding: 11px 8px;
	font-size: 17px;
	font-weight: 800;
	color: var(--th-ink, #241b11);
	min-height: 46px;
	display: flex;
	align-items: center;
	justify-content: center;
}
.twe-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.twe-chip {
	border: 1px solid var(--th-border, #e4ddcc);
	background: #fff;
	color: var(--th-primary, #1d4a2e);
	border-radius: 999px;
	padding: 7px 16px;
	font-size: 13px;
	font-weight: 700;
	cursor: pointer;
	transition: all .15s ease;
}
.twe-chip:hover { border-color: var(--th-primary, #1d4a2e); }
.twe-chip.is-active {
	background: var(--th-primary, #1d4a2e);
	border-color: var(--th-primary, #1d4a2e);
	color: #fff;
}
.twe-total {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 10px;
	padding: 12px 14px;
	background: #f3efe3;
	border-radius: 12px;
	margin: 0 0 14px;
}
.twe-total__label { font-size: 14px; font-weight: 700; color: var(--th-ink, #241b11); }
.twe-total__price { font-size: 19px; font-weight: 900; color: var(--th-primary, #1d4a2e); }
.twe-submit {
	width: 100%;
	min-height: 50px;
	border-radius: 999px;
	font-size: 16px;
	font-weight: 800;
}
.twe-hint { font-size: 12.5px; color: var(--th-muted, #6e675a); margin: 10px 0 0; text-align: center; }
.twe-form-err {
	background: #fdecea;
	color: #a12b1f;
	border: 1px solid #f3c1b9;
	border-radius: 10px;
	padding: 10px 14px;
	font-size: 13.5px;
	font-weight: 700;
	margin: 0 0 12px;
}

/* Packaging selector (Additional Checkout Fields) — premium select */
.wc-block-checkout .wc-block-components-select select,
.wc-block-checkout select {
	min-height: 48px;
	border-radius: 12px !important;
	border-color: var(--th-border, #e4ddcc) !important;
	font-size: 14.5px;
	font-family: inherit;
}
.wc-block-checkout .wc-block-components-checkout-step--with-step-number .wc-block-components-checkout-step__title {
	font-weight: 800;
	color: var(--th-primary, #1d4a2e);
}
#order-information-additional-fields .wc-block-components-checkout-step__title,
.wc-block-components-checkout-step[aria-label*="بسته"] .wc-block-components-checkout-step__title {
	font-weight: 800;
	color: var(--th-primary, #1d4a2e);
}

/* Price display on cards/PDP */
.twe-price-perkg { font-size: .95em; }
.twe-price-perkg del { opacity: .7; }

/* Cart: weight item qty lock + change link */
.twe-qty-locked { display: inline-block; font-weight: 800; min-width: 24px; text-align: center; }
.twe-change-weight { font-size: 12.5px; color: var(--th-primary, #1d4a2e); text-decoration: underline; }
.woocommerce-mini-cart-item .twe-change-weight { display: none; }

/* Checkout block: item meta rows are already styled by WC; keep weight bold */
.wc-block-cart-item__prices .twe-qty-locked, .wc-block-checkout .twe-qty-locked { display: none; }
.twe-weight-badge {
	display: inline-block;
	background: #eef2e6;
	color: var(--th-primary, #1d4a2e);
	border-radius: 999px;
	padding: 2px 10px;
	font-size: 12px;
	font-weight: 700;
}

@media (max-width: 480px) {
	.twe-block { padding: 14px 12px; }
	.twe-stepper__btn { width: 42px; height: 42px; }
}

/* ------------------------------------------------------------------ 1.1.0
 * Package count + two-row totals (weight and amount) on the PDP picker.
 * .twe-total was a single flex row; it is now a definition list with one row
 * per figure, so the label/value pairing survives long Persian numerals.
 */
.twe-qty {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin: 0 0 12px;
}
.twe-qty__label {
	font-size: 14px;
	font-weight: 700;
	color: var(--th-ink, #241b11);
}
.twe-qty__input {
	width: 92px;
	min-height: 44px;
	padding: 6px 10px;
	text-align: center;
	font-size: 16px;
	font-weight: 800;
	color: var(--th-ink, #241b11);
	background: #fff;
	border: 1px solid var(--th-border, #e4ddcc);
	border-radius: 10px;
}
.twe-qty__input:focus-visible {
	outline: 2px solid var(--th-primary, #1d4a2e);
	outline-offset: 2px;
}
.twe-total {
	display: block;
	padding: 10px 14px;
}
.twe-total__row {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 10px;
	padding: 3px 0;
}
.twe-total dt,
.twe-total dd { margin: 0; }
.twe-total__weight {
	font-size: 15px;
	font-weight: 800;
	color: var(--th-ink, #241b11);
}
.twe-total__row--price {
	margin-top: 4px;
	padding-top: 8px;
	border-top: 1px dashed var(--th-border, #e4ddcc);
}
.twe-form-err {
	margin: 10px 0 0;
	padding: 8px 12px;
	border-radius: 10px;
	background: #fdecec;
	color: #8a1c1c;
	font-size: 13px;
	font-weight: 700;
}
@media (max-width: 480px) {
	.twe-qty { flex-wrap: wrap; }
	.twe-qty__input { width: 100%; }
}
