/**
 * Yuktera BOGO — storefront styles.
 *
 * Colours are inherited from the active theme's CSS custom properties wherever
 * possible, with sensible fallbacks, so the plugin matches the shop without any
 * theme edits. The Lumilux theme disables WooCommerce's own stylesheet, so
 * everything needed here is defined locally.
 */

:root {
	--yb-accent: var(--site-accent-color, #b8893b);
	--yb-heading: var(--site-heading-color, #1d1d1d);
	--yb-text: var(--site-text-color, #555);
	--yb-border: var(--site-border-color, #e6e6e6);
	--yb-success: #1a7f37;
	--yb-radius: var(--site-button-radius, 3px);
}

/* ---------------------------------------------------------------
   Catalogue badge
   Mirrors the theme's own .onsale / .nova_new_product badge so it
   stacks correctly inside .product-item__badges.
   --------------------------------------------------------------- */

.product-item__badges .yb-badge,
.nova-qv-images .product-item__badges .yb-badge {
	position: absolute;
	top: 0;
	left: 0;
	display: block;
	padding: 6px 10px;
	font-size: 12px;
	line-height: 1;
	font-weight: 600;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	color: #fff;
	background-color: var(--yb-accent);
	border-radius: var(--yb-radius);
	z-index: 2;
}

/* Standalone position, used when the theme badge area is not available. */
.yb-badge-wrap {
	display: inline-block;
	margin-bottom: 8px;
}

.yb-badge-wrap .yb-badge {
	position: static;
	display: inline-block;
	padding: 5px 10px;
	font-size: 11px;
	line-height: 1;
	font-weight: 600;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	color: #fff;
	background-color: var(--yb-accent);
	border-radius: var(--yb-radius);
}

/* ---------------------------------------------------------------
   Single product offer note
   --------------------------------------------------------------- */

.yb-offer-box {
	margin: 0 0 20px;
	padding: 14px 16px;
	border: 1px dashed var(--yb-accent);
	border-radius: var(--yb-radius);
	background: rgba(184, 137, 59, 0.06);
}

.yb-offer-line {
	display: flex;
	align-items: flex-start;
	gap: 9px;
	margin: 0;
	padding: 0;
	font-size: 14px;
	line-height: 1.5;
	color: var(--yb-heading);
}

.yb-offer-line + .yb-offer-line {
	margin-top: 8px;
	padding-top: 8px;
	border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.yb-offer-text {
	flex: 1 1 auto;
}

/* Small gift icon drawn in CSS so no image request is needed. */
.yb-offer-icon {
	position: relative;
	flex: 0 0 auto;
	width: 16px;
	height: 16px;
	margin-top: 2px;
	border: 2px solid var(--yb-accent);
	border-radius: 2px;
	box-sizing: border-box;
}

.yb-offer-icon::before {
	content: "";
	position: absolute;
	top: -2px;
	left: 50%;
	width: 2px;
	height: 16px;
	background: var(--yb-accent);
	transform: translateX(-50%);
}

/* ---------------------------------------------------------------
   Cart and checkout line labelling
   --------------------------------------------------------------- */

.yb-pill {
	display: inline-block;
	margin-left: 6px;
	padding: 3px 8px;
	font-size: 10px;
	font-weight: 700;
	line-height: 1.3;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	color: #fff;
	background: var(--yb-success);
	border-radius: 2px;
	vertical-align: middle;
	white-space: nowrap;
}

.yb-pill--saving {
	background: var(--yb-accent);
}

.yb-pill--small {
	font-size: 9px;
	padding: 2px 6px;
}

.yb-line-note {
	display: block;
	margin-top: 4px;
	font-size: 12px;
	line-height: 1.4;
	color: var(--yb-text);
}

.yb-line-note .amount {
	font-weight: 600;
	color: var(--yb-accent);
}

.yb-was {
	opacity: 0.55;
	text-decoration: line-through;
}

.yb-now {
	text-decoration: none;
	font-weight: 600;
	background: none;
}

.yb-locked-qty {
	display: inline-block;
	min-width: 32px;
	padding: 4px 8px;
	font-size: 13px;
	text-align: center;
	color: var(--yb-text);
	border: 1px solid var(--yb-border);
	border-radius: var(--yb-radius);
	background: rgba(0, 0, 0, 0.02);
}

/* Reward rows read as a continuation of the row above them. */
.woocommerce-cart-form__cart-item.yb-reward-item td,
tr.yb-reward-item td {
	background: rgba(26, 127, 55, 0.04);
}

.woocommerce-mini-cart-item.yb-reward-item {
	background: rgba(26, 127, 55, 0.05);
}

/* ---------------------------------------------------------------
   Cart notices
   --------------------------------------------------------------- */

.yb-cart-notices {
	margin: 0 0 22px;
}

.yb-cart-notice {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0 0 8px;
	padding: 12px 16px;
	font-size: 14px;
	line-height: 1.5;
	border-radius: var(--yb-radius);
	border: 1px solid var(--yb-border);
	background: #fafafa;
	color: var(--yb-heading);
}

.yb-cart-notice--earned {
	border-color: rgba(26, 127, 55, 0.35);
	background: rgba(26, 127, 55, 0.07);
}

.yb-cart-notice--earned .yb-offer-icon {
	border-color: var(--yb-success);
}

.yb-cart-notice--earned .yb-offer-icon::before {
	background: var(--yb-success);
}

.yb-cart-notice--progress {
	border-color: rgba(184, 137, 59, 0.4);
	background: rgba(184, 137, 59, 0.08);
}

/* ---------------------------------------------------------------
   Offer list shortcode
   --------------------------------------------------------------- */

.yb-offer-list {
	margin: 0 0 24px;
}

.yb-offer-list__title {
	margin: 0 0 12px;
	font-size: 18px;
}

.yb-offer-list__items {
	margin: 0;
	padding: 0;
	list-style: none;
}

.yb-offer-list__item {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 10px;
	margin: 0 0 8px;
	padding: 12px 14px;
	border: 1px solid var(--yb-border);
	border-radius: var(--yb-radius);
	background: #fff;
}

.yb-offer-list__item .yb-badge {
	position: static;
	display: inline-block;
	padding: 5px 9px;
	font-size: 11px;
	line-height: 1;
	font-weight: 600;
	text-transform: uppercase;
	color: #fff;
	background: var(--yb-accent);
	border-radius: var(--yb-radius);
}

.yb-offer-list__name {
	font-weight: 600;
	color: var(--yb-heading);
}

.yb-offer-list__desc {
	flex: 1 1 100%;
	font-size: 13px;
	color: var(--yb-text);
}

/* ---------------------------------------------------------------
   Small screens
   --------------------------------------------------------------- */

@media (max-width: 768px) {
	.yb-cart-notice {
		align-items: flex-start;
		font-size: 13px;
	}

	.yb-pill {
		margin-left: 4px;
	}

	.yb-offer-list__item {
		align-items: flex-start;
	}
}
