/**
 * Nutritix Bundle Product Section — Styles
 *
 * @package nutritix
 * @since   1.5.0
 */

/* =========================================================
   Hide default WooCommerce product display on bundle pages.
   bundle.css is only enqueued on bundle-enabled products.
   Nutritix wraps WC content in .site-main — no .woocommerce
   ancestor exists — so target via .single-product body class.
   ========================================================= */
.single-product .woocommerce-product-gallery,
.single-product .summary.entry-summary {
	display: none !important;
}

/* =========================================================
   Section Wrapper
   ========================================================= */
.nutritix-bundle-section {
	margin: 0;
	padding: 56px 0;
	background: #fff9f6;
	border-top: 1px solid var(--border, #e8e8e8);
	border-bottom: 1px solid var(--border, #e8e8e8);
	clear: both;
}

.nutritix-bundle-inner {
	max-width: 960px;
	margin: 0 auto;
	padding: 0 24px;
}

/* =========================================================
   Header
   ========================================================= */
.nutritix-bundle-header {
	text-align: center;
	margin-bottom: 36px;
}

.nutritix-bundle-header .bundle-title {
	font-size: clamp(24px, 3vw, 36px);
	font-weight: 700;
	color: var(--primary, #F65000);
	line-height: 1.2;
	margin: 0 0 10px;
	letter-spacing: -0.02em;
}

.nutritix-bundle-header .bundle-subtitle {
	font-size: 15px;
	color: var(--text-light, #888888);
	margin: 0;
}

.nutritix-bundle-header .bundle-subtitle strong {
	color: var(--accent, #151515);
}

/* =========================================================
   Body Layout (image + pricing)
   ========================================================= */
.nutritix-bundle-body {
	display: flex;
	align-items: flex-start;
	gap: 40px;
}

/* =========================================================
   Left: Product Image
   ========================================================= */
.nutritix-bundle-media {
	flex: 0 0 auto;
	width: 280px;
}

.bundle-media-inner {
	position: relative;
	border-radius: 16px;
	overflow: hidden;
	background: #fff;
	box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
}

.bundle-product-image {
	display: block;
	width: 100%;
	height: auto;
	object-fit: cover;
	transition: opacity 0.3s ease;
}

/* Discount badge circle */
.bundle-discount-badge {
	position: absolute;
	bottom: 16px;
	left: 16px;
	width: 72px;
	height: 72px;
	border-radius: 50%;
	background: var(--accent, #151515);
	color: #fff;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	line-height: 1.0;
	pointer-events: none;
	box-shadow: 0 3px 12px rgba(0, 0, 0, 0.3);
}

.bundle-discount-badge .badge-number {
	font-size: 20px;
	font-weight: 800;
	display: block;
	letter-spacing: -0.04em;
}

.bundle-discount-badge .badge-text {
	font-size: 10px;
	font-weight: 700;
	display: block;
	letter-spacing: 0.06em;
}

/* =========================================================
   Right: Pricing
   ========================================================= */
.nutritix-bundle-pricing {
	flex: 1 1 0;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 12px;
}

/* =========================================================
   Pricing Option Cards
   ========================================================= */
.nutritix-bundle-option {
	position: relative;
	display: flex;
	align-items: center;
	gap: 14px;
	background: #fff;
	border: 2px solid var(--border, #e8e8e8);
	border-radius: 14px;
	padding: 18px 20px;
	cursor: pointer;
	transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
	user-select: none;
	outline: none;
}

.nutritix-bundle-option:hover {
	border-color: var(--primary, #F65000);
	box-shadow: 0 0 0 4px rgba(246, 80, 0, 0.08);
}

.nutritix-bundle-option:focus-visible {
	box-shadow: 0 0 0 3px rgba(246, 80, 0, 0.4);
}

.nutritix-bundle-option.active {
	border-color: var(--primary, #F65000);
	background: var(--primary, #F65000);
}

.nutritix-bundle-option.active .option-label {
	color: #fff;
}

.nutritix-bundle-option.active .price-separator {
	color: rgba(255, 255, 255, 0.3);
}

.nutritix-bundle-option.active .price-total-wrap {
	color: rgba(255, 255, 255, 0.7);
}

.nutritix-bundle-option.active .price-each {
	color: rgba(255, 255, 255, 0.85);
}

.nutritix-bundle-option.active .price-value {
	color: #fff;
}

.nutritix-bundle-option.active .price-total {
	color: #fff;
	font-weight: 700;
}

.nutritix-bundle-option.active .price-original {
	color: rgba(255, 255, 255, 0.38);
}

.nutritix-bundle-option.active .option-checkmark {
	color: #fff;
}

/* Subscribe badge pill */
.option-badge-pill {
	position: absolute;
	top: -13px;
	right: 18px;
	background: var(--primary, #F65000);
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	padding: 3px 10px;
	border-radius: 20px;
	letter-spacing: 0.04em;
	white-space: nowrap;
}

.option-content {
	flex: 1 1 0;
	min-width: 0;
}

.option-label {
	font-size: 15px;
	font-weight: 700;
	color: var(--accent, #151515);
	margin-bottom: 6px;
	letter-spacing: -0.01em;
}

/* Prices row */
.option-prices {
	display: flex;
	align-items: baseline;
	flex-wrap: wrap;
	gap: 4px 0;
	font-size: 14px;
	color: var(--text, #464646);
}

.price-each {
	font-size: 14px;
	color: var(--text-light, #888);
}

.price-each .price-value {
	color: var(--accent, #151515);
	font-size: 18px;
	font-weight: 800;
}

.price-each .price-value .woocommerce-Price-currencySymbol {
	font-size: 13px;
	vertical-align: super;
	font-weight: 700;
}

.price-separator {
	color: var(--border, #e8e8e8);
}

.price-total-wrap {
	font-size: 13px;
	color: var(--text-light, #888);
}

.price-total {
	font-weight: 700;
	color: var(--text, #464646);
}

.price-original {
	font-size: 13px;
	color: var(--text-light, #888);
	text-decoration: line-through;
	margin-left: 6px;
}

/* Checkmark icon */
.option-checkmark {
	flex-shrink: 0;
	width: 22px;
	height: 22px;
	color: var(--border, #cccccc);
	transition: color 0.2s ease;
}

.nutritix-bundle-option:hover .option-checkmark {
	color: var(--primary, #F65000);
}

/* =========================================================
   Pack Selector — div-based (avoids all theme button hacks)
   ========================================================= */
.nutritix-bundle-packs {
	display: flex;
	gap: 10px;
	margin-top: 4px;
	flex-wrap: wrap;
}

.pack-btn {
	flex: 1 1 auto;
	min-width: 80px;
	padding: 12px 14px;
	background: #fff;
	color: var(--accent, #151515);
	border: 2px solid var(--border, #e0e0e0);
	border-radius: 40px;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-align: center;
	text-transform: uppercase;
	cursor: pointer;
	transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
	outline: none;
	user-select: none;
}

.pack-btn:hover {
	border-color: var(--primary, #F65000);
	color: var(--primary, #F65000);
	background: rgba(246, 80, 0, 0.04);
}

.pack-btn.active {
	background: var(--primary, #F65000);
	border-color: var(--primary, #F65000);
	color: #fff;
	box-shadow: 0 4px 14px rgba(246, 80, 0, 0.30);
}

.pack-btn:focus-visible {
	box-shadow: 0 0 0 3px rgba(246, 80, 0, 0.4);
}

/* =========================================================
   CTA Button — also a div, fully custom styled
   ========================================================= */
.nutritix-bundle-cta {
	margin-top: 4px;
}

.nutritix-bundle-cta .nutritix-bundle-add-to-cart {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	width: 100%;
	padding: 18px 24px;
	background: var(--accent, #151515);
	color: #fff;
	font-size: 14px;
	font-weight: 800;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	border-radius: 50px;
	cursor: pointer;
	transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
	outline: none;
	user-select: none;
	box-sizing: border-box;
}

.nutritix-bundle-cta .nutritix-bundle-add-to-cart:hover {
	background: var(--primary, #F65000);
	color: #fff;
	box-shadow: 0 6px 20px rgba(246, 80, 0, 0.35);
	transform: translateY(-1px);
}

.nutritix-bundle-cta .nutritix-bundle-add-to-cart:active {
	transform: translateY(0);
	background: #dd4800;
}

.nutritix-bundle-cta .nutritix-bundle-add-to-cart:focus-visible {
	box-shadow: 0 0 0 3px rgba(246, 80, 0, 0.5);
}

/* Loading state */
.btn-loading {
	display: none;
}

.nutritix-bundle-cta .nutritix-bundle-add-to-cart.is-loading .btn-text {
	opacity: 0.6;
}

.nutritix-bundle-cta .nutritix-bundle-add-to-cart.is-loading .btn-loading {
	display: flex;
	align-items: center;
}

.loading-spinner {
	width: 20px;
	height: 20px;
	animation: nutritix-spin 0.8s linear infinite;
}

@keyframes nutritix-spin {
	from { transform: rotate(0deg); }
	to   { transform: rotate(360deg); }
}

/* =========================================================
   Included Products List
   ========================================================= */
.nutritix-bundle-products-list {
	text-align: center;
	margin-top: 28px;
	padding-top: 20px;
	border-top: 1px dashed var(--border, #e8e8e8);
}

.nutritix-bundle-products-list .included-label {
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.10em;
	color: var(--text-light, #888);
	margin: 0 0 8px;
}

.nutritix-bundle-products-list ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px;
}

.nutritix-bundle-products-list li {
	font-size: 13px;
	color: var(--text, #464646);
	background: #fff;
	border: 1px solid var(--border, #e8e8e8);
	border-radius: 20px;
	padding: 4px 14px;
}

/* =========================================================
   Error / Notice
   ========================================================= */
.nutritix-bundle-notice {
	padding: 12px 16px;
	border-radius: 8px;
	font-size: 14px;
	margin-top: 10px;
	display: none;
}

.nutritix-bundle-notice.error {
	background: #fff0f0;
	border: 1px solid #f5c2c7;
	color: #842029;
}

/* =========================================================
   Responsive — Tablet
   ========================================================= */
@media (max-width: 900px) {
	.nutritix-bundle-media {
		width: 220px;
	}
}

/* =========================================================
   Responsive — Mobile
   ========================================================= */
@media (max-width: 640px) {
	.nutritix-bundle-section {
		padding: 36px 0;
	}

	.nutritix-bundle-body {
		flex-direction: column;
		align-items: center;
		gap: 24px;
	}

	.nutritix-bundle-media {
		width: 220px;
	}

	.nutritix-bundle-pricing {
		width: 100%;
	}

	.nutritix-bundle-header .bundle-title {
		font-size: 22px;
	}

	.option-prices {
		flex-direction: column;
		gap: 2px;
	}

	.price-separator {
		display: none;
	}

	.price-original {
		margin-left: 0;
	}
}

@media (max-width: 380px) {
	.nutritix-bundle-inner {
		padding: 0 16px;
	}

	.pack-btn {
		font-size: 12px;
		padding: 10px 12px;
	}
}
