/**
 * Cart & Checkout — Weight-based product display
 * Pill layout for package breakdown.
 */

/* Grouped sides: nested display under main product name */
.wbpw-sides-grouped {
	display: block;
	margin-top: 0.5em;
	padding-left: 1em;
	border-left: 2px solid #e2ddd6;
	font-size: 0.9em;
	color: #52525b;
}
.wbpw-sides-label {
	font-weight: 600;
}

/* Separate line items: indent so side items visually belong under main product */
.cart_item.wbpw-side-item .product-name,
.cart_item.wbpw-side-item td:first-child {
	padding-left: 2em;
	border-left: 3px solid #e2ddd6;
	margin-left: 0.5em;
}
.wc-block-cart-items__row.wbpw-side-item .wc-block-components-product-name,
.wc-block-cart-items__row.wbpw-side-item .wc-block-components-product-details,
.wc-block-components-order-summary-item.wbpw-side-item .wc-block-components-product-name,
.wc-block-components-order-summary-item.wbpw-side-item .wc-block-components-product-details {
	padding-left: 2em;
	border-left: 3px solid #e2ddd6;
	margin-left: 0.5em;
}

/* Child items: product images at half the main product image size */
.cart_item.wbpw-side-item .product-thumbnail {
	max-width: 50px;
	max-height: 50px;
	overflow: hidden;
}
.cart_item.wbpw-side-item .product-thumbnail img {
	max-width: 50px;
	max-height: 50px;
	width: auto;
	height: auto;
	object-fit: contain;
}
.wbpw-side-item img {
	max-width: 50px;
	max-height: 50px;
	width: auto;
	height: auto;
	object-fit: contain;
}
/* Block checkout order summary */
.wc-block-components-order-summary-item.wbpw-side-item .wc-block-components-product-name {
	padding-left: 2em;
	border-left: 3px solid #e2ddd6;
	margin-left: 0.5em;
}

.product-name .variation .item-variation-value,
.product-name .variation dd {
	line-height: 1.6;
}

.wbp-cart-pills {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 8px;
}

.wbp-cart-pill {
	display: inline-block;
	padding: 4px 12px;
	border: 1px solid #e2ddd6;
	font-size: 13px;
	color: #52525b;
}

/* Block cart — stack each detail on its own line, hide " / " separators */
.wc-block-components-product-details > span {
	display: block;
	margin-bottom: 0.5em;
}

.wc-block-components-product-details > span:last-child {
	margin-bottom: 0;
}

/* Weight-based product rows: hide " / " separators, pills layout */
.wc-block-cart-items__row.wbpw-product .wc-block-components-product-details span[aria-hidden="true"],
.wc-block-components-order-summary-item.wbpw-product .wc-block-components-product-details span[aria-hidden="true"] {
	display: none !important;
}

/* Weight-based: inline by default (Total Weight: xx kg, Grind +: Full on same line) */
.wc-block-cart-items__row.wbpw-product .wc-block-components-product-details__value,
.wc-block-components-order-summary-item.wbpw-product .wc-block-components-product-details__value {
	display: inline;
}

/* Only Packages value (contains pills) on next line */
.wc-block-cart-items__row.wbpw-product .wc-block-components-product-details__value:has(.wbp-cart-pills),
.wc-block-components-order-summary-item.wbpw-product .wc-block-components-product-details__value:has(.wbp-cart-pills) {
	display: block;
	margin-top: 0.35em;
}

.wc-block-cart-items__row.wbpw-product .wc-block-components-product-details .wbp-cart-pills,
.wc-block-components-order-summary-item.wbpw-product .wc-block-components-product-details .wbp-cart-pills {
	margin-top: 0.25em;
}

/* Blocks cart item "Price" area:
   Hide the rendered <price/> token only for non-discounted weight rows that
   receive the `lf-wbpw-hide-individual-price-token` class from cartItemClass. */
.wc-block-cart-items__row.lf-wbpw-hide-individual-price-token .wc-block-cart-item__prices .wc-block-formatted-money-amount {
	display: none !important;
}

/* Checkout order summary uses a different price wrapper. */
.wc-block-components-order-summary-item.lf-wbpw-hide-individual-price-token .wc-block-components-order-summary-item__individual-prices .wc-block-formatted-money-amount {
	display: none !important;
}

/* Mini-cart/cart discounted rows:
   Keep our custom base-rate label (beforeItemPrice) but hide the native
   computed `<price/>` token fragments (itemPrice), which are injected as
   `span[data-wp-text="state.itemPrice"]`. */
.lf-wbpw-hide-individual-price-token .wc-block-cart-item__prices [data-wp-text="state.itemPrice"] {
	display: none !important;
}

.lf-wbpw-hide-individual-price-token .wc-block-components-order-summary-item__individual-prices [data-wp-text="state.itemPrice"] {
	display: none !important;
}

.lf-wbpw-hide-individual-price-token .wc-block-cart-item__prices [data-wp-text="state.afterItemPrice"],
.lf-wbpw-hide-individual-price-token .wc-block-components-order-summary-item__individual-prices [data-wp-text="state.afterItemPrice"] {
	display: none !important;
}

.wc-block-components-product-details__name {
	display: inline;
	font-weight: 500;
}

/* Standard product rows: keep value inline */
.wc-block-cart-items__row:not(.wbpw-product) .wc-block-components-product-details__value {
	display: inline;
}

/* Block checkout order summary — same product-details layout as cart */
.wc-block-components-order-summary-item.wbpw-product .wc-block-components-product-details span[aria-hidden="true"] {
	display: none !important;
}

.wc-block-components-order-summary-item.wbpw-product .wc-block-components-product-details__value:has(.wbp-cart-pills) {
	display: block;
	margin-top: 0.35em;
}

.wc-block-components-order-summary-item.wbpw-product .wc-block-components-product-details .wbp-cart-pills {
	margin-top: 0.25em;
}

/* Block checkout order summary — same product-details layout as cart */
.wc-block-components-order-summary-item.wbpw-product .wc-block-components-product-details span[aria-hidden="true"] {
	display: none !important;
}

.wc-block-components-order-summary-item.wbpw-product .wc-block-components-product-details__value:has(.wbp-cart-pills) {
	display: block;
	margin-top: 0.35em;
}

.wc-block-components-order-summary-item.wbpw-product .wc-block-components-product-details .wbp-cart-pills {
	margin-top: 0.25em;
}

/* Block checkout order summary — same pills layout as cart */
.wc-block-components-order-summary-item.wbpw-product .wc-block-components-product-details span[aria-hidden="true"] {
	display: none !important;
}
.wc-block-components-order-summary-item.wbpw-product .wc-block-components-product-details__value:has(.wbp-cart-pills) {
	display: block;
	margin-top: 0.35em;
}
.wc-block-components-order-summary-item.wbpw-product .wc-block-components-product-details .wbp-cart-pills {
	margin-top: 0.25em;
}


/* Block checkout order summary — same product-details layout as cart */
.wc-block-components-order-summary-item.wbpw-product .wc-block-components-product-details span[aria-hidden="true"] {
	display: none !important;
}
.wc-block-components-order-summary-item.wbpw-product .wc-block-components-product-details__value:has(.wbp-cart-pills) {
	display: block;
	margin-top: 0.35em;
}
.wc-block-components-order-summary-item.wbpw-product .wc-block-components-product-details .wbp-cart-pills {
	margin-top: 0.25em;
}

/* Block checkout order summary — wbpw-product scoped styling */
.wc-block-components-order-summary-item.wbpw-product .wc-block-components-product-details span[aria-hidden="true"] {
	display: none !important;
}

.wc-block-components-order-summary-item.wbpw-product .wc-block-components-product-details__value:has(.wbp-cart-pills) {
	display: block;
	margin-top: 0.35em;
}

.wc-block-components-order-summary-item.wbpw-product .wc-block-components-product-details .wbp-cart-pills {
	margin-top: 0.25em;
}

/* Block checkout order summary: same pill/separator rules for weight-based items */
.wc-block-components-order-summary-item.wbpw-product .wc-block-components-product-details span[aria-hidden="true"] {
	display: none !important;
}

.wc-block-components-order-summary-item.wbpw-product .wc-block-components-product-details__value {
	display: inline;
}

.wc-block-components-order-summary-item.wbpw-product .wc-block-components-product-details__value:has(.wbp-cart-pills) {
	display: block;
	margin-top: 0.35em;
}

.wc-block-components-order-summary-item.wbpw-product .wc-block-components-product-details .wbp-cart-pills {
	margin-top: 0.25em;
}

/* Block checkout order summary — same scoping for weight-based items */
.wc-block-components-order-summary-item.wbpw-product .wc-block-components-product-details span[aria-hidden="true"] {
	display: none !important;
}

.wc-block-components-order-summary-item.wbpw-product .wc-block-components-product-details__value {
	display: inline;
}

.wc-block-components-order-summary-item.wbpw-product .wc-block-components-product-details__value:has(.wbp-cart-pills) {
	display: block;
	margin-top: 0.35em;
}

.wc-block-components-order-summary-item.wbpw-product .wc-block-components-product-details .wbp-cart-pills {
	margin-top: 0.25em;
}

/* Block checkout order summary — same weight-based rules as cart */
.wc-block-components-order-summary-item.wbpw-product .wc-block-components-product-details span[aria-hidden="true"] {
	display: none !important;
}

.wc-block-components-order-summary-item.wbpw-product .wc-block-components-product-details__value {
	display: inline;
}

.wc-block-components-order-summary-item.wbpw-product .wc-block-components-product-details__value:has(.wbp-cart-pills) {
	display: block;
	margin-top: 0.35em;
}

.wc-block-components-order-summary-item.wbpw-product .wc-block-components-product-details .wbp-cart-pills {
	margin-top: 0.25em;
}
