/* WC Bundle Offer Box — 前端样式
 * 颜色策略:默认不写死颜色,--bob-primary 由 JS 在运行时读取主题按钮的
 * 背景色自动生成;后台设置了颜色时才通过内联变量覆盖。
 */

.bob-box {
	max-width: 720px;
	margin: 18px 0;
	font-size: 16px;
	line-height: 1.4;
}

/* ---- 稀缺进度条 ---- */
.bob-progress {
	display: flex;
	align-items: center;
	gap: 16px;
	background: #fff;
	border-radius: 999px;
	padding: 14px 22px;
	box-shadow: 0 4px 18px rgba(0, 0, 0, 0.07);
	margin-bottom: 22px;
}
.bob-progress-track {
	flex: 1;
	height: 12px;
	background: #ececec;
	border-radius: 999px;
	overflow: hidden;
	box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}
.bob-progress-fill {
	position: relative;
	height: 100%;
	border-radius: 999px;
	overflow: hidden;
	background: var(--bob-bar, #c0281c);
	background: linear-gradient(90deg, color-mix(in srgb, var(--bob-bar, #c0281c) 62%, #fff), var(--bob-bar, #c0281c));
	box-shadow: 0 1px 6px color-mix(in srgb, var(--bob-bar, #c0281c) 45%, transparent);
	transition: width 1.1s cubic-bezier(0.22, 0.75, 0.25, 1);
}
/* 流光扫过动效 */
.bob-progress-fill::after {
	content: "";
	position: absolute;
	top: 0;
	bottom: 0;
	left: -60%;
	width: 55%;
	background: linear-gradient(105deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.5) 50%, rgba(255, 255, 255, 0) 100%);
	animation: bobShine 2.6s ease-in-out infinite;
}
@keyframes bobShine {
	0% { left: -60%; }
	60% { left: 110%; }
	100% { left: 110%; }
}
.bob-progress-text {
	font-weight: 700;
	color: var(--bob-bar, #c0281c);
	white-space: nowrap;
	font-variant-numeric: tabular-nums;
}
@media (prefers-reduced-motion: reduce) {
	.bob-progress-fill { transition: none; }
	.bob-progress-fill::after { animation: none; display: none; }
}

/* ---- 档位卡片 ---- */
.bob-tiers {
	display: flex;
	flex-direction: column;
	gap: 14px;
	margin-bottom: 20px;
}
.bob-tier {
	position: relative;
	display: block;
	background: #fff;
	border: 2px solid #e4e0ee;
	border-radius: 14px;
	padding: 16px 18px;
	cursor: pointer;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
	margin: 0;
}
.bob-tier:hover {
	border-color: var(--bob-primary, #7c5cbf);
}
.bob-tier.is-selected {
	border-color: var(--bob-primary, #7c5cbf);
	box-shadow: 0 0 0 1px var(--bob-primary, #7c5cbf), 0 6px 20px rgba(0, 0, 0, 0.06);
}
.bob-tier-radio {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

/* 角标徽章 */
.bob-badge {
	position: absolute;
	top: -12px;
	right: 18px;
	background: var(--bob-badge, var(--bob-primary, #7c5cbf));
	color: #fff;
	font-size: 13px;
	font-weight: 600;
	padding: 4px 14px;
	border-radius: 8px 8px 8px 0;
}

/* 主行:缩略图 + 标题 + 价格 */
.bob-tier-main {
	display: flex;
	align-items: center;
	gap: 14px;
}
.bob-tier-thumb {
	display: flex;
	flex-shrink: 0;
	width: 64px;
	justify-content: flex-start;
}
.bob-tier-thumb img {
	width: 34px !important;
	max-width: 34px !important;
	height: auto !important;
	object-fit: contain;
	margin: 0;
	box-shadow: none !important;
	border-radius: 4px;
}
.bob-tier-thumb img + img {
	margin-left: -18px;
}
/* 自定义套餐图:整图显示,不做叠放 */
.bob-tier-thumb.bob-thumb-custom img {
	width: 58px !important;
	max-width: 58px !important;
	height: 58px !important;
	object-fit: cover;
	border-radius: 8px;
}
@media (max-width: 480px) {
	.bob-tier-thumb.bob-thumb-custom img {
		width: 44px !important;
		max-width: 44px !important;
		height: 44px !important;
	}
}
.bob-tier-info {
	flex: 1;
	display: flex;
	flex-direction: column;
	min-width: 0;
}
.bob-tier-title {
	font-weight: 700;
	font-size: 1.15em;
	color: #1d1d2b;
}
.bob-tier-subtitle {
	color: #6b6b7b;
	font-size: 0.9em;
}
.bob-tier-price {
	text-align: right;
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	white-space: nowrap;
}
.bob-price-now {
	font-weight: 700;
	font-size: 1.15em;
	color: #1d1d2b;
}
.bob-price-now .bob-unit {
	font-weight: 400;
	font-size: 0.8em;
	color: #6b6b7b;
}
.bob-price-was {
	color: #a0a0ad;
	text-decoration: line-through;
	font-size: 0.9em;
}
/* 防止主题给 WooCommerce 价格强加颜色(如绿色) */
.bob-box .woocommerce-Price-amount,
.bob-box .woocommerce-Price-amount bdi,
.bob-box .woocommerce-Price-currencySymbol {
	color: inherit !important;
	font-size: inherit !important;
	font-weight: inherit !important;
}
.bob-price-was .woocommerce-Price-amount,
.bob-price-was .woocommerce-Price-amount bdi {
	color: #a0a0ad !important;
	text-decoration: line-through;
}

/* 卖点列表 */
.bob-features {
	display: none;
	flex-direction: column;
	gap: 8px;
	margin-top: 14px;
	padding-top: 4px;
}
.bob-tier.is-selected .bob-features {
	display: flex;
}
.bob-feature {
	display: flex;
	align-items: center;
	gap: 10px;
	font-weight: 600;
	color: #1d1d2b;
}
.bob-feature svg {
	flex-shrink: 0;
	color: #1d1d2b;
}

/* 附加横幅(GRATIS) */
.bob-banner {
	display: none;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	background: #9a9aa5;
	color: #fff;
	padding: 10px 14px;
	margin: 14px -18px -16px;
	border-radius: 0 0 12px 12px;
	font-weight: 600;
}
.bob-tier.is-selected .bob-banner {
	display: flex;
}
.bob-banner-price {
	text-decoration: line-through;
	opacity: 0.85;
	font-weight: 400;
}

/* CTA 按钮:颜色不写死,默认继承主题对 .button.alt 的样式;
 * 仅当后台设置了主色时,内联 CSS 才覆盖背景色。这里只控制布局与排版。 */
.bob-button,
.bob-box .single_add_to_cart_button.bob-button {
	display: block;
	width: 100%;
	border-radius: 10px;
	padding: 18px 20px;
	font-size: 17px;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	cursor: pointer;
	transition: filter 0.15s ease;
	text-align: center;
}
.bob-button:hover,
.bob-box .single_add_to_cart_button.bob-button:hover {
	filter: brightness(1.08);
}

@media (max-width: 480px) {
	.bob-box {
		font-size: 15px;
	}
	.bob-tier-thumb {
		width: 48px;
	}
	.bob-tier-thumb img {
		width: 28px;
	}
	.bob-progress {
		padding: 10px 16px;
	}
}
