/* AUTOBOSS Coupons — after-coupon price (detail page, SKU sheet, product cards, cart lines).
   Headline look (default), as on Taobao: "After coupon $90.00" takes the place and typography
   of the main price, and the regular price steps back to a small grey "Before coupon $100.00"
   (never struck through: it is the price, not a former price). Tag and text looks are a line
   beside or under the price in the colour from Settings (--abcp-ap).
   Text rule for every block: words wrap (long German/French labels, "from" phrases), amounts
   never break inside, and nothing is clipped or pushed out of its box. */
.abcp-ap {
	--abcp-ap: #ff5000;
	display: inline-flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0 6px;
	max-width: 100%;
	min-width: 0;
	color: var(--abcp-ap);
	font-size: 13px;
	line-height: 20px;
}
.abcp-ap[hidden], .abcp-ap [hidden] { display: none !important; }
.abcp-ap-label, .abcp-ap-from { min-width: 0; overflow-wrap: anywhere; -webkit-hyphens: auto; hyphens: auto; }
.abcp-ap-head { min-width: 0; }
.abcp-ap-label { font-weight: 600; }
.abcp-ap-from { font-size: .92em; }
.abcp-ap-price { display: inline-flex; align-items: baseline; font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.abcp-ap-save { color: #666; font-size: 12px; white-space: nowrap; }
.abcp-ap-save > span { white-space: normal; }
.abcp-ap-save i, .abcp-ap-save .woocommerce-Price-amount { color: inherit; font: inherit; font-style: normal; }
.abcp-ap-code { padding: 0 5px; border-radius: 3px; background: color-mix(in srgb, var(--abcp-ap) 10%, #fff); font-size: 12px; letter-spacing: .02em; white-space: nowrap; }

/* ---------- Tag: small solid label + price ---------- */
.abcp-ap.is-tag { gap: 2px 5px; }
.abcp-ap.is-tag .abcp-ap-label { align-self: center; padding: 0 5px; border-radius: 3px; background: var(--abcp-ap); color: #fff; font-size: 12px; line-height: 18px; }
.abcp-ap.is-tag .abcp-ap-price { font-size: 15px; }

/* ---------- Text ---------- */
.abcp-ap.is-text .abcp-ap-price { font-size: 14px; }

/* Sizes (tag / text). */
.abcp-ap.is-sm { font-size: 12px; }
.abcp-ap.is-sm .abcp-ap-price { font-size: 13px; }
.abcp-ap.is-lg { font-size: 14px; }
.abcp-ap.is-lg .abcp-ap-price { font-size: 17px; }

/* ---------- Detail page price block (AUTOBOSS Taobao detail) ---------- */
.abtd-price > .abcp-ap:not(.is-lead) { align-self: center; }
.abtd-price-after > .abcp-ap { display: inline-flex; }

/* Headline on the detail price line, and in the SKU sheet head (same typography). */
.abtd-price.abcp-ap-lead { flex-wrap: wrap; row-gap: 2px; }
.abcp-ap.is-lead.is-detail, .abcp-ap.is-lead.is-sheet { align-items: flex-end; gap: 0 4px; color: var(--abtd-price, var(--abcp-ap)); font-family: var(--abtd-num, inherit); font-weight: 600; }
.abcp-ap.is-lead.is-detail .abcp-ap-label, .abcp-ap.is-lead.is-sheet .abcp-ap-label { font-family: var(--abtd-font, inherit); font-size: 15px; line-height: 20px; }
.abcp-ap.is-lead.is-detail .abcp-ap-from, .abcp-ap.is-lead.is-sheet .abcp-ap-from { font-family: var(--abtd-font, inherit); font-size: 13px; line-height: 20px; font-weight: 400; }
.abcp-ap.is-lead.is-detail .abcp-ap-price, .abcp-ap.is-lead.is-sheet .abcp-ap-price { align-items: flex-end; font-weight: 600; }
.abcp-ap.is-lead.is-detail .abcp-ap-cur, .abcp-ap.is-lead.is-sheet .abcp-ap-cur { margin-right: 1px; font-size: 16px; line-height: 20px; }
.abcp-ap.is-lead.is-detail .abcp-ap-int { font-size: 28px; line-height: 28px; }
.abcp-ap.is-lead.is-detail .abcp-ap-dec, .abcp-ap.is-lead.is-sheet .abcp-ap-dec { font-size: 16px; line-height: 20px; }
.abcp-ap.is-lead.is-detail.is-sm .abcp-ap-int { font-size: 24px; line-height: 24px; }
.abcp-ap.is-lead.is-detail.is-lg .abcp-ap-int { font-size: 32px; line-height: 32px; }
/* Saving: a small tinted chip, like Taobao's "省¥10". */
.abcp-ap.is-lead.is-detail .abcp-ap-save, .abcp-ap.is-lead.is-sheet .abcp-ap-save { align-self: center; margin-left: 4px; padding: 0 6px; border-radius: 3px; background: color-mix(in srgb, var(--abtd-price, var(--abcp-ap)) 10%, #fff); color: var(--abtd-price, var(--abcp-ap)); font-family: var(--abtd-font, inherit); font-size: 12px; font-weight: 500; line-height: 20px; }
.abcp-ap.is-lead.is-detail .abcp-ap-code, .abcp-ap.is-lead.is-sheet .abcp-ap-code { align-self: center; font-family: var(--abtd-num, inherit); font-weight: 500; color: var(--abtd-price, var(--abcp-ap)); line-height: 20px; }
/* The regular price, now secondary; its "Before coupon" label rides on it (::before) so the two never wrap apart. */
/* Block, not flex: the label words may wrap, the amounts (adjacent spans, no break opportunity) never split. */
.abtd-price.abcp-ap-lead .abtd-price-now { display: inline-block; white-space: normal; color: var(--abtd-sub, #888); font-weight: 400; }
.abtd-price.abcp-ap-lead .abtd-price-now::before { content: var(--abcp-ap-before, none); margin-right: 4px; font-family: var(--abtd-font, inherit); font-size: 14px; line-height: 20px; }
.abtd-price.abcp-ap-lead .abtd-price-now .abtd-cur,
.abtd-price.abcp-ap-lead .abtd-price-now .abtd-int,
.abtd-price.abcp-ap-lead .abtd-price-now .abtd-dec,
.abtd-price.abcp-ap-lead .abtd-price-now .abtd-dash { margin: 0; font-size: 14px; line-height: 20px; }
.abtd-price.abcp-ap-lead .abtd-price-was { font-size: 13px; }
/* Phone price band colours: inline, under the detail page's own phone breakpoint (see ABCP_After_Price::enqueue). */

/* ---------- SKU sheet head ---------- */
.abcp-ap.is-sheet { display: flex; width: 100%; }
/* The text column beside the sheet picture must be allowed to shrink, so a long label wraps
   instead of pushing the price under the close button. */
.abtd-sku-head > div:has(> .abcp-ap.is-sheet) { flex: 1 1 auto; min-width: 0; }
.abcp-ap.is-lead.is-sheet .abcp-ap-int { font-size: 24px; line-height: 26px; }
.abcp-ap-lead > .abtd-sku-price { display: block; white-space: normal; color: var(--abtd-sub, #888); font-weight: 400; }
.abcp-ap-lead > .abtd-sku-price::before { content: var(--abcp-ap-before, none); margin-right: 4px; font-family: var(--abtd-font, inherit); font-size: 13px; line-height: 18px; }
.abcp-ap-lead > .abtd-sku-price .abtd-cur, .abcp-ap-lead > .abtd-sku-price .abtd-int,
.abcp-ap-lead > .abtd-sku-price .abtd-dec, .abcp-ap-lead > .abtd-sku-price .abtd-dash { margin: 0; font-size: 13px; line-height: 18px; }
.abtd-sku-head > div > .abcp-ap:not(.is-lead) { margin-top: 2px; }

/* ---------- Product cards (AUTOBOSS Product Card), every list context ---------- */
/* Tag / text: own line under price and sold count (a zero-height break before it). */
.abpc-foot > .abcp-ap:not(.is-lead) { order: 9; margin-top: 2px; font-size: 12px; }
.abpc-foot:has(> .abcp-ap:not(.is-lead):not([hidden]))::after { content: ""; order: 8; flex-basis: 100%; height: 0; }
.abpc-foot > .abcp-ap.is-tag .abcp-ap-price, .abpc-foot > .abcp-ap.is-text .abcp-ap-price { font-size: 13px; }
/* Headline: a full-width block — the label (wraps freely in any language) over the price,
   which becomes the card price; the regular price follows small and grey. */
.abpc-foot > .abcp-ap.is-lead { flex: 1 1 100%; flex-direction: column; flex-wrap: nowrap; align-items: flex-start; gap: 0; color: var(--abpc-price, var(--abcp-ap)); font-family: var(--abpc-num, inherit); font-weight: 500; }
.abpc-foot > .abcp-ap.is-lead .abcp-ap-head { display: block; max-width: 100%; font-family: var(--abpc-font, inherit); font-size: 12px; line-height: 16px; }
.abpc-foot > .abcp-ap.is-lead .abcp-ap-label { font-weight: 600; }
.abpc-foot > .abcp-ap.is-lead .abcp-ap-from { font-size: 12px; font-weight: 400; }
.abpc-foot > .abcp-ap.is-lead .abcp-ap-price { max-width: 100%; font-weight: 500; line-height: 22px; }
.abpc-foot > .abcp-ap.is-lead .abcp-ap-cur { font-size: 14px; }
.abpc-foot > .abcp-ap.is-lead .abcp-ap-int, .abpc-foot > .abcp-ap.is-lead .abcp-ap-dec { font-size: var(--abpc-num-size, 18px); line-height: 22px; }
.abpc-foot.abcp-ap-lead .abpc-price { color: var(--abpc-weak, #999); font-weight: 400; }
.abpc-foot.abcp-ap-lead .abpc-price .abpc-cur, .abpc-foot.abcp-ap-lead .abpc-amount b, .abpc-foot.abcp-ap-lead .abpc-from { font-size: 12px; font-weight: 400; line-height: 18px; }
.abpc-foot.abcp-ap-lead .abpc-was { display: none; }
/* Very narrow cards (two-up phone grids, sliders): step the amount down rather than clip it. */
@container (max-width: 170px) {
	.abpc-foot > .abcp-ap.is-lead .abcp-ap-int, .abpc-foot > .abcp-ap.is-lead .abcp-ap-dec { font-size: 15px; }
	.abpc-foot > .abcp-ap.is-lead .abcp-ap-cur { font-size: 12px; }
}

/* ---------- Cart lines (side cart drawer; cart page when enabled): WooCommerce's real allocation ---------- */
.abcp-ap-line { display: block; margin-top: 2px; color: var(--absc-price, var(--abtd-price, #956008)); font-size: 12px; font-weight: 400; line-height: 16px; overflow-wrap: anywhere; }
.abcp-ap-line .abcp-ap-label { font-family: var(--theme-font-family, inherit); font-weight: 600; }
.abcp-ap-line b { font-weight: 600; white-space: nowrap; }
.abcp-ap-line .woocommerce-Price-amount { color: inherit; font: inherit; }

/* Secondary price ranges ("€252.00 – €270.00"): the amounts are adjacent spans with no break
   opportunity, so offer one right after the dash for narrow sheets and phones. */
.abcp-ap-lead .abtd-dash::after { content: "\200B"; }
