/* Cadou la alegere (BOGO). Override the variables in the theme to match the brand. */
:root {
	/* Uses the theme's primary color when it exposes one (Ohio: --clb-color-primary). */
	--gm-bogo-accent: var(--clb-color-primary, #c8102e);
	--gm-bogo-accent-soft: #fff4f5;
	--gm-bogo-ok: #1e8e3e;
	--gm-bogo-border: #e5e5e5;
	--gm-bogo-text: inherit;
	--gm-bogo-radius: 10px;
}

/* ---------- Promo notices ---------- */
.gm-bogo-notice {
	margin: 0 0 14px;
	background: var(--gm-bogo-accent-soft);
	background: color-mix(in srgb, var(--gm-bogo-accent) 8%, #fff);
	padding: 10px 14px;
	border-left: 4px solid var(--gm-bogo-accent);
	border-radius: 6px;
	color: var(--gm-bogo-text);
	font-size: 0.95em;
	line-height: 1.45;
}
.gm-bogo-notice a { color: var(--gm-bogo-accent); font-weight: 600; text-decoration: underline; }

/* ---------- Selector ---------- */
form.cart:has(.gm-bogo-selector) { flex-wrap: wrap; }

.gm-bogo-selector {
	flex: 0 0 100%;
	width: 100%;
	box-sizing: border-box;
	margin: 0 0 18px;
	padding: 14px;
	border: 2px dashed var(--gm-bogo-accent);
	border-radius: var(--gm-bogo-radius);
	background: #fff;
	text-align: left;
}
.gm-bogo-selector.is-complete { border-style: solid; border-color: var(--gm-bogo-ok); }
.gm-bogo-selector.has-error { box-shadow: 0 0 0 3px color-mix(in srgb, var(--gm-bogo-accent) 25%, transparent); }

.gm-bogo-selector__head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.gm-bogo-selector__icon { font-size: 26px; line-height: 1; }
.gm-bogo-selector__titles { flex: 1; min-width: 0; }
.gm-bogo-selector__title { display: block; font-size: 1.05em; line-height: 1.3; }
.gm-bogo-selector__note { display: block; font-size: 0.85em; opacity: 0.75; line-height: 1.35; margin-top: 2px; }
.gm-bogo-selector__counter {
	flex: 0 0 auto;
	padding: 4px 10px;
	border-radius: 999px;
	background: var(--gm-bogo-accent);
	color: #fff;
	font-size: 0.9em;
	white-space: nowrap;
}
.gm-bogo-selector.is-complete .gm-bogo-selector__counter { background: var(--gm-bogo-ok); }

.gm-bogo-selector__list { list-style: none; margin: 0; padding: 0; }
.gm-bogo-item {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0;
	padding: 8px 0;
	border-top: 1px solid var(--gm-bogo-border);
}
.gm-bogo-item:first-child { border-top: 0; }
.gm-bogo-item.is-selected .gm-bogo-item__name { font-weight: 700; }
.gm-bogo-item.is-disabled { opacity: 0.5; }

.gm-bogo-item__thumb { flex: 0 0 48px; width: 48px; height: 48px; display: block; }
.gm-bogo-item__thumb img { width: 48px !important; height: 48px !important; object-fit: cover; border-radius: 6px; margin: 0 !important; }
.gm-bogo-item__info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.gm-bogo-item__name { font-size: 0.92em; line-height: 1.3; cursor: pointer; margin: 0; }
.gm-bogo-item__price { font-size: 0.85em; }
.gm-bogo-item__price del { opacity: 0.6; margin-right: 4px; }
.gm-bogo-item__price ins { text-decoration: none; font-weight: 700; color: var(--gm-bogo-ok); }
.gm-bogo-item__oos { color: #888; }

.gm-bogo-stepper { flex: 0 0 auto; display: inline-flex; align-items: stretch; border: 1px solid var(--gm-bogo-border); border-radius: 6px; overflow: hidden; }
.gm-bogo-stepper button {
	width: 34px; min-height: 34px; margin: 0; padding: 0;
	border: 0; border-radius: 0; background: #f5f5f5; color: #222;
	font-size: 18px; line-height: 1; cursor: pointer; box-shadow: none;
}
.gm-bogo-stepper button:disabled { opacity: 0.35; cursor: not-allowed; }
.gm-bogo-stepper input.gm-bogo-qty {
	width: 40px !important; min-height: 34px; margin: 0 !important; padding: 0 !important;
	border: 0 !important; border-radius: 0; text-align: center; background: #fff; box-shadow: none;
	-moz-appearance: textfield; appearance: textfield;
}
.gm-bogo-stepper input.gm-bogo-qty::-webkit-outer-spin-button,
.gm-bogo-stepper input.gm-bogo-qty::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.gm-bogo-selector__multiplier,
.gm-bogo-selector__warn,
.gm-bogo-selector__empty { margin: 10px 0 0; font-size: 0.88em; }
.gm-bogo-selector__error { margin: 10px 0 0; color: var(--gm-bogo-accent); font-weight: 700; font-size: 0.92em; }

/* Loop badges are generated inline (li.product.post-{ID}::before), see GM_Bogo_Frontend::badge_css(). */

/* ---------- Cart ---------- */
.gm-bogo-free { color: var(--gm-bogo-ok); font-weight: 700; text-decoration: none; }
.gm-bogo-cart-qty { display: inline-block; min-width: 2em; text-align: center; }

/* Gift flag next to the product name: classic cart, checkout review, FunnelKit side cart. */
.gm-bogo-gift-flag {
	display: inline-block;
	margin-left: 4px;
	padding: 1px 6px;
	border-radius: 4px;
	background: var(--gm-bogo-ok);
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	line-height: 1.5;
	vertical-align: middle;
	white-space: nowrap;
}
.fkcart-item-price del { opacity: 0.6; margin-right: 4px; }
.fkcart-item-price ins { text-decoration: none; }

/* Ohio: add-to-cart form is a flex row ("woo-button-group"); give the selector its own line. */
form.cart.woo-button-group:has(.gm-bogo-selector) { flex-wrap: wrap; }

/* ---------- Single mode: one gift product × X (radio list) ---------- */
.gm-bogo-item--radio { padding: 0; }
.gm-bogo-item__label {
	display: flex;
	align-items: center;
	gap: 10px;
	width: 100%;
	margin: 0;
	padding: 8px 6px;
	border-radius: 8px;
	cursor: pointer;
	font-weight: inherit;
}
.gm-bogo-item--radio:hover .gm-bogo-item__label { background: #fafafa; }
.gm-bogo-item--radio.is-selected .gm-bogo-item__label {
	background: color-mix(in srgb, var(--gm-bogo-ok) 8%, #fff);
	box-shadow: inset 0 0 0 2px var(--gm-bogo-ok);
}
.gm-bogo-item--radio.is-disabled .gm-bogo-item__label { cursor: not-allowed; }
.gm-bogo-item--radio .gm-bogo-item__name { display: block; }
.gm-bogo-item--radio.is-selected .gm-bogo-item__name { font-weight: 700; }
.gm-bogo-item--radio .gm-bogo-item__price { display: block; }
input.gm-bogo-radio {
	flex: 0 0 auto;
	width: 20px !important;
	height: 20px !important;
	margin: 0 !important;
	accent-color: var(--gm-bogo-ok);
	cursor: inherit;
}
.gm-bogo-item__times {
	flex: 0 0 auto;
	padding: 3px 8px;
	border-radius: 999px;
	background: #f2f2f2;
	font-size: 0.85em;
	font-weight: 700;
	white-space: nowrap;
}
.gm-bogo-item--radio.is-selected .gm-bogo-item__times { background: var(--gm-bogo-ok); color: #fff; }
.gm-bogo-selector.is-unavailable { border-style: solid; border-color: #ccc; }
