:root {
	--b24eo-paper: #ffffff;
	--b24eo-plaster: #f6f5f2;
	--b24eo-ink: #1a1a1a;
	--b24eo-stone: #8a857e;
	--b24eo-orange: #ef731b;
	--b24eo-line: #e8e5df;
	--b24eo-green: #3f8f5f;
	--b24eo-border: var(--b24eo-line);
	--b24eo-border-active: var(--b24eo-ink);
	--b24eo-bg: var(--b24eo-paper);
	--b24eo-bg-active: var(--b24eo-paper);
	--b24eo-text: var(--b24eo-ink);
	--b24eo-text-muted: var(--b24eo-stone);
	--b24eo-toggle-bg: var(--b24eo-ink);
	--b24eo-toggle-text: #ffffff;
}

/* Theme-proof baseline reset inside plugin UI */
.b24eo-options-wrap,
.b24eo-options-wrap * {
	box-sizing: border-box;
}

.b24eo-options-wrap button {
	-webkit-appearance: none !important;
	appearance: none !important;
	font: inherit !important;
	text-transform: none !important;
	letter-spacing: normal !important;
}

/* Reset theme pill styles without `all: unset` (Safari/Firefox can leave odd hit-targets). */
.b24eo-options-wrap .b24eo-qty-btn {
	box-sizing: border-box !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	background: transparent !important;
	font: inherit !important;
	line-height: 1 !important;
	text-align: center !important;
	text-decoration: none !important;
	box-shadow: none !important;
	-webkit-appearance: none !important;
	appearance: none !important;
}

/* Modal lives outside .b24eo-options-wrap; theme black pill buttons need explicit overrides. */
.b24eo-modal .b24eo-modal-close {
	-webkit-appearance: none !important;
	appearance: none !important;
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	width: 40px !important;
	height: 40px !important;
	min-width: 40px !important;
	max-width: 40px !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	border-radius: 999px !important;
	background: transparent !important;
	color: var(--b24eo-ink) !important;
	box-shadow: none !important;
	font-size: 1.75rem !important;
	font-weight: 400 !important;
	line-height: 1 !important;
	cursor: pointer !important;
	text-decoration: none !important;
	text-transform: none !important;
	letter-spacing: normal !important;
	float: none !important;
	position: absolute !important;
	top: 10px !important;
	right: 10px !important;
	z-index: 2 !important;
}

.b24eo-modal .b24eo-modal-close:hover,
.b24eo-modal .b24eo-modal-close:focus-visible {
	background: rgba(26, 26, 26, 0.06) !important;
	color: var(--b24eo-ink) !important;
	outline: none !important;
}

.b24eo-modal .b24eo-modal-gallery {
	display: flex !important;
	flex-wrap: wrap !important;
	gap: 8px !important;
	margin-top: 10px !important;
	padding: 0 !important;
	background: transparent !important;
	border: 0 !important;
	box-shadow: none !important;
	overflow-x: auto !important;
}

.b24eo-modal .b24eo-modal-thumb {
	-webkit-appearance: none !important;
	appearance: none !important;
	display: block !important;
	width: auto !important;
	height: auto !important;
	min-width: 0 !important;
	max-width: none !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 2px solid transparent !important;
	border-radius: 8px !important;
	background: transparent !important;
	box-shadow: none !important;
	cursor: pointer !important;
	flex: 0 0 auto !important;
	text-decoration: none !important;
	text-transform: none !important;
	letter-spacing: normal !important;
	float: none !important;
	line-height: 0 !important;
}

.b24eo-modal .b24eo-modal-thumb.is-active {
	border-color: var(--b24eo-ink) !important;
}

/* Legacy/optimized cache fallback when old button markup still renders. */
form.cart button.b24eo-qty-btn,
.single-product form.cart button.b24eo-qty-btn,
.elementor-widget-woocommerce-product-add-to-cart form.cart button.b24eo-qty-btn {
	-webkit-appearance: none !important;
	appearance: none !important;
	width: 28px !important;
	height: 28px !important;
	min-width: 28px !important;
	max-width: 28px !important;
	border-radius: 999px !important;
	background: var(--b24eo-paper) !important;
	color: var(--b24eo-ink) !important;
	border: 1px solid var(--b24eo-line) !important;
	padding: 0 !important;
	margin: 0 !important;
	box-shadow: none !important;
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	line-height: 1 !important;
	text-decoration: none !important;
	float: none !important;
}

form.cart .b24eo-option-item.is-selected button.b24eo-qty-plus,
.single-product form.cart .b24eo-option-item.is-selected button.b24eo-qty-plus,
.elementor-widget-woocommerce-product-add-to-cart form.cart .b24eo-option-item.is-selected button.b24eo-qty-plus {
	background: var(--b24eo-orange) !important;
	border-color: var(--b24eo-orange) !important;
	color: #fff !important;
}

.b24eo-options-wrap {
	margin-top: 0;
	border-top: 0;
	padding-top: 0;
	font-family: Inter, "Helvetica Neue", Helvetica, Arial, sans-serif;
}

/* Some themes style form.cart children as inline/flex items. Force full row width. */
form.cart .b24eo-extra-root,
form.cart .b24eo-options-wrap {
	display: block !important;
	width: 100% !important;
	max-width: 100% !important;
	flex: 0 0 100% !important;
	clear: both;
	position: relative;
	z-index: 0;
}

/* Extra block comes after the button in DOM; if anything overlaps (flex/margin bugs), keep
 * native add-to-cart + quantity above this block for hit-testing (Safari/Firefox). */
.single-product form.cart .quantity,
.single-product form.cart button.single_add_to_cart_button,
.single-product form.cart input.button.alt[name="add-to-cart"],
.elementor-widget-woocommerce-product-add-to-cart form.cart .quantity,
.elementor-widget-woocommerce-product-add-to-cart form.cart button.single_add_to_cart_button {
	position: relative;
	z-index: 2;
}

/* Keep wishlist button beside add-to-cart when extra options are rendered. */
form.cart .b24eo-wishlist-near-cart {
	display: inline-flex !important;
	vertical-align: middle !important;
	margin-left: 10px !important;
	width: auto !important;
	max-width: min(100%, 120px) !important;
	flex: 0 0 auto !important;
	align-self: center !important;
}

form.cart .b24eo-wishlist-near-cart .woosw-btn,
form.cart .b24eo-wishlist-near-cart a.woosw-btn {
	width: auto !important;
	min-width: 0 !important;
	max-width: 100% !important;
	display: inline-flex !important;
}

/* Keep native quantity input visible next to add-to-cart. */
.single-product form.cart .quantity {
	display: inline-block !important;
	vertical-align: middle !important;
	margin-right: 10px !important;
	opacity: 1 !important;
	visibility: visible !important;
}

/* Safety override: keep main product gallery image visible. */
.single-product div.product div.images img.wp-post-image,
.single-product .woocommerce-product-gallery img.wp-post-image {
	display: block !important;
	visibility: visible !important;
	opacity: 1 !important;
	width: 100% !important;
	height: auto !important;
	max-width: 100% !important;
}

/* Elementor/Woo edge case: gallery stays at opacity:0 */
.single-product .woocommerce-product-gallery,
.single-product .woocommerce-product-gallery__wrapper,
.single-product .woocommerce-product-gallery__image {
	opacity: 1 !important;
	visibility: visible !important;
}

.b24eo-main-image-fallback {
	max-width: 540px;
	margin: 0 0 16px;
}

.b24eo-main-image-fallback img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 14px;
}

.b24eo-title {
	margin: 0 0 10px;
	font-size: 0.875rem;
	font-weight: 600;
	line-height: 1.3;
	color: var(--b24eo-ink);
	letter-spacing: -0.01em;
}

.b24eo-options-list {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

/* Norbad product-page option row */
.b24eo-option-item {
	width: 100%;
	min-height: 48px;
	border: 1px solid var(--b24eo-line);
	border-radius: 14px;
	background: var(--b24eo-paper);
	padding: 0.9rem 1rem;
	display: flex;
	align-items: center;
	gap: 0.75rem;
	text-align: left;
	cursor: default;
	transition: border-color 0.15s ease;
	flex-wrap: nowrap;
}

.b24eo-option-item:hover {
	border-color: var(--b24eo-ink);
}

.b24eo-option-item:focus-visible {
	outline: 2px solid var(--b24eo-ink);
	outline-offset: 2px;
}

.b24eo-option-item.is-selected {
	border-color: var(--b24eo-line);
	background: var(--b24eo-paper);
}

.b24eo-option-item.is-unavailable {
	opacity: 0.55;
}

.b24eo-option-item.is-unavailable .b24eo-thumb-wrap,
.b24eo-option-item.is-unavailable .b24eo-meta,
.b24eo-option-item.is-unavailable .b24eo-check {
	cursor: default;
}

.b24eo-option-item.is-unavailable .b24eo-qty-btn {
	opacity: 0.45;
	cursor: not-allowed !important;
	pointer-events: none;
}

.b24eo-check {
	flex: 0 0 1.25rem;
	width: 1.25rem;
	height: 1.25rem;
	border-radius: 0.25rem;
	border: 1px solid var(--b24eo-line);
	background: transparent;
	color: transparent;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 12px;
	font-weight: 700;
	line-height: 1;
	cursor: pointer;
	user-select: none;
	transition: background-color 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}

.b24eo-option-item.is-selected .b24eo-check {
	background: var(--b24eo-orange);
	border-color: var(--b24eo-orange);
	color: #ffffff;
}

.b24eo-stock-note {
	display: inline-block;
	margin-top: 2px;
	font-size: 0.75rem;
	font-weight: 600;
	color: #b91c1c;
}

.b24eo-thumb-wrap {
	flex: 0 0 40px;
	cursor: pointer;
}

.b24eo-thumb {
	display: block;
	width: 40px !important;
	height: 40px !important;
	min-width: 40px !important;
	max-width: 40px !important;
	flex: 0 0 40px;
	object-fit: cover;
	border-radius: 8px;
	background: var(--b24eo-plaster);
}

.b24eo-meta {
	display: flex;
	flex-direction: column;
	min-width: 0;
	flex: 1 1 auto;
	gap: 2px;
	cursor: pointer;
}

.b24eo-name {
	font-weight: 600;
	color: var(--b24eo-ink);
	line-height: 1.25;
	word-break: break-word;
	font-size: 0.9375rem;
	margin: 0 !important;
}

.b24eo-sub {
	font-size: 0.75rem;
	font-weight: 400;
	color: var(--b24eo-stone);
	line-height: 1.3;
	margin: 0 !important;
}

.b24eo-price {
	flex: 0 0 auto;
	font-size: 0.875rem;
	font-weight: 600;
	color: var(--b24eo-ink);
	margin: 0 !important;
	white-space: nowrap;
	line-height: 1.2;
}

.b24eo-option-item:not(.is-selected) .b24eo-price {
	color: var(--b24eo-stone);
	font-weight: 500;
}

.b24eo-toggle {
	flex: 0 0 auto;
	width: 44px;
	height: 44px;
	border-radius: 999px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: var(--b24eo-ink);
	color: #ffffff;
	font-size: 1.3rem;
	line-height: 1;
	font-weight: 700;
}

.b24eo-qty-controls {
	flex: 0 0 auto;
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	gap: 6px;
	margin-left: 2px;
	white-space: nowrap;
}

.b24eo-qty-btn {
	width: 28px !important;
	height: 28px !important;
	min-width: 28px !important;
	max-width: 28px !important;
	border-radius: 999px;
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	background: var(--b24eo-paper) !important;
	color: var(--b24eo-ink) !important;
	font-size: 1.05rem;
	font-weight: 500;
	user-select: none;
	border: 1px solid var(--b24eo-line) !important;
	box-shadow: none;
	cursor: pointer;
	padding: 0 !important;
	line-height: 1 !important;
	text-decoration: none !important;
	float: none !important;
	position: relative !important;
	margin: 0 !important;
}

.b24eo-qty-minus {
	padding-bottom: 2px;
}

.b24eo-option-item.is-selected .b24eo-qty-plus {
	background: var(--b24eo-orange) !important;
	border-color: var(--b24eo-orange) !important;
	color: #fff !important;
}

.b24eo-qty-value {
	min-width: 18px !important;
	text-align: center;
	font-weight: 600;
	color: var(--b24eo-ink);
	font-size: 0.9375rem;
	line-height: 1;
	font-variant-numeric: tabular-nums;
	display: inline-block !important;
}

/* Hide qty stepper when quantity is 0 or 1 — checkbox is the primary control */
.b24eo-option-item[data-qty="0"] .b24eo-qty-controls,
.b24eo-option-item[data-qty="1"] .b24eo-qty-controls {
	display: none !important;
}

.b24eo-total-line {
	margin-top: 16px;
	padding-top: 16px;
	border-top: 1px solid var(--b24eo-line);
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 10px;
}

.b24eo-total-label {
	font-size: 0.875rem;
	color: var(--b24eo-stone);
	font-weight: 500;
}

.b24eo-total-value {
	font-weight: 700;
	color: var(--b24eo-ink);
	font-size: 1.75rem;
	line-height: 1;
	letter-spacing: -0.025em;
	font-variant-numeric: tabular-nums;
}

/* Modal is moved to document.body via JS so fixed + z-index are never trapped by a
 * transformed form/summary parent. Closed state must not participate in hit-testing. */
.b24eo-modal {
	position: fixed;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	inset: 0;
	z-index: 2147483646;
	display: none !important;
	visibility: hidden;
	pointer-events: none !important;
}

.b24eo-modal.is-open {
	display: block !important;
	visibility: visible;
	pointer-events: auto !important;
}

.b24eo-modal-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(26, 26, 26, 0.45);
}

.b24eo-modal-dialog {
	position: relative;
	max-width: 520px;
	width: calc(100% - 24px);
	max-height: calc(100vh - 60px);
	overflow: auto;
	background: var(--b24eo-paper);
	border-radius: 16px;
	padding: 16px;
	margin: 30px auto;
}

.b24eo-modal-main-image {
	width: 100%;
	height: auto;
	max-height: 360px;
	border-radius: 12px;
	background: var(--b24eo-plaster);
	object-fit: cover;
	margin-bottom: 8px;
}

.b24eo-modal-thumb img {
	width: 54px;
	height: 54px;
	display: block;
	object-fit: cover;
	border-radius: 6px;
}

.b24eo-modal-content {
	margin-top: 14px;
	padding: 8px 2px 2px;
}

.b24eo-modal-title {
	margin: 0;
	font-size: 1.25rem;
	line-height: 1.2;
	font-weight: 600;
	color: var(--b24eo-ink);
	letter-spacing: -0.02em;
}

.b24eo-modal-price {
	font-weight: 700;
	margin-top: 8px;
	font-size: 1.25rem;
	color: var(--b24eo-ink);
	letter-spacing: -0.02em;
}

.b24eo-modal-description {
	margin-top: 24px !important;
	color: var(--b24eo-ink) !important;
	font-size: 0.9rem !important;
	line-height: 1.5 !important;
	margin-bottom: 24px !important;
}

.b24eo-modal-description[hidden] {
	display: none !important;
	margin: 0 !important;
}

@media (max-width: 480px) {
	.b24eo-option-item {
		padding: 0.85rem 0.9rem;
		gap: 0.65rem;
	}

	.b24eo-thumb-wrap {
		flex-basis: 36px;
	}

	.b24eo-thumb {
		width: 36px !important;
		height: 36px !important;
		min-width: 36px !important;
		max-width: 36px !important;
	}

	.b24eo-qty-btn {
		width: 26px !important;
		height: 26px !important;
		min-width: 26px !important;
		max-width: 26px !important;
		font-size: 1rem;
	}

	.b24eo-qty-value {
		font-size: 0.875rem;
		min-width: 16px;
	}

	.b24eo-total-value {
		font-size: 1.5rem;
	}

	.b24eo-modal-dialog {
		max-width: 100%;
		margin: 12px auto;
		padding: 12px;
		max-height: calc(100vh - 24px);
	}

	.b24eo-modal-main-image {
		max-height: 320px;
	}
}
