/* Shi Bundle — storefront widget. Scoped, theme-agnostic, no external deps. */
.shi-bundle-widget {
	--shi-accent: #1c5a3f;
	--shi-cards-bg: #eef1ef;
	--shi-selected-bg: #ffffff;
	--shi-border: #1c5a3f;
	--shi-title: #1b1e1c;
	--shi-muted: #7d837f;
	--shi-radius: 12px;
	--shi-gap: 12px;
	--shi-btn-bg: #1c5a3f;
	--shi-btn-fg: #ffffff;
	font-family: inherit;
	color: var(--shi-title);
	max-width: 560px;
	margin: 20px 0;
	box-sizing: border-box;
}
.shi-bundle-widget *,
.shi-bundle-widget *::before,
.shi-bundle-widget *::after { box-sizing: border-box; }

.shi-bw-title {
	text-align: center;
	font-weight: 800;
	letter-spacing: 1px;
	font-size: 15px;
	margin-bottom: 16px;
	position: relative;
}
.shi-bw-title::before,
.shi-bw-title::after {
	content: "";
	position: absolute;
	top: 50%;
	width: 22%;
	height: 1px;
	background: #e0e4e1;
}
.shi-bw-title::before { left: 0; }
.shi-bw-title::after { right: 0; }

/* Tiers */
.shi-bw-tiers { display: flex; flex-direction: column; gap: var(--shi-gap); }
.shi-bw-tier {
	display: flex;
	align-items: center;
	gap: 14px;
	position: relative;
	padding: 15px 18px;
	border-radius: var(--shi-radius);
	background: var(--shi-cards-bg);
	border: 2px solid transparent;
	cursor: pointer;
	transition: background .18s, border-color .18s, box-shadow .18s;
}
.shi-bw-tier.is-selected {
	background: var(--shi-selected-bg);
	border-color: var(--shi-border);
	box-shadow: 0 6px 18px rgba(28, 90, 63, .14);
}
.shi-bw-tier input { position: absolute; opacity: 0; pointer-events: none; }
.shi-bw-radio {
	flex: none;
	width: 20px; height: 20px;
	border-radius: 50%;
	border: 2px solid #c2c8c4;
	background: #fff;
	position: relative;
	transition: border-color .18s;
}
.shi-bw-tier.is-selected .shi-bw-radio { border-color: var(--shi-accent); }
.shi-bw-tier.is-selected .shi-bw-radio::after {
	content: ""; position: absolute; inset: 4px;
	border-radius: 50%; background: var(--shi-accent);
}
.shi-bw-tier-title { flex: 1; font-size: 16px; font-weight: 600; }
.shi-bw-tier-title small { display: block; font-weight: 500; color: var(--shi-muted); font-size: 12px; }
.shi-bw-price { text-align: right; line-height: 1.2; }
.shi-bw-now { font-size: 16px; font-weight: 700; }
.shi-bw-price del { display: block; font-size: 13px; color: #9aa0a3; }
.shi-bw-badge {
	position: absolute; top: -10px; right: 14px;
	font-size: 10px; font-weight: 800; letter-spacing: .3px;
	padding: 2px 9px; border-radius: 20px;
}

/* Plan (one-time vs subscribe) */
.shi-bw-plan { display: flex; gap: 10px; margin-top: 16px; }
.shi-bw-plan-opt {
	flex: 1; position: relative;
	padding: 14px 16px; border-radius: var(--shi-radius);
	background: #fff; border: 2px solid #e4e8e5;
	cursor: pointer; text-align: center; font-family: inherit;
	transition: background .18s, border-color .18s;
}
.shi-bw-plan-opt.is-selected { border-color: var(--shi-border); background: var(--shi-selected-bg); }
.shi-bw-plan-title { display: block; font-size: 15px; font-weight: 700; }
.shi-bw-plan-sub { display: block; font-size: 12px; color: var(--shi-muted); margin-top: 2px; }
.shi-bw-plan-badge {
	position: absolute; top: -9px; right: 12px;
	background: var(--shi-accent); color: #fff;
	font-size: 10px; font-weight: 800; padding: 2px 8px; border-radius: 20px;
}

/* Upsells — always 3-up, fluid so they fit 320px→768px without overlap */
.shi-bw-upsells { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(6px, 1.8vw, 12px); margin-top: 22px; }
.shi-bw-upsell {
	display: flex; flex-direction: column; align-items: stretch;
	padding: clamp(7px, 2vw, 12px); border-radius: clamp(10px, 2.5vw, var(--shi-radius));
	background: #fff; border: 1px solid #e4e8e5; text-align: center;
	opacity: .62; transition: border-color .18s, opacity .18s; min-width: 0;
}
.shi-bw-upsell.is-on { border-color: var(--shi-accent); opacity: 1; }
.shi-bw-upsell-toggle {
	width: clamp(34px, 9vw, 44px); height: clamp(19px, 5vw, 24px); border: none; border-radius: 999px;
	background: #cfd4d1; position: relative; cursor: pointer; margin: 0 auto clamp(6px, 1.6vw, 8px);
	display: block; transition: background .18s; flex: none;
}
.shi-bw-upsell.is-on .shi-bw-upsell-toggle { background: var(--shi-accent); }
.shi-bw-upsell-toggle span {
	position: absolute; top: 2px; left: 2px; height: calc(100% - 4px); aspect-ratio: 1 / 1; width: auto;
	border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25);
	transition: left .18s, right .18s;
}
.shi-bw-upsell.is-on .shi-bw-upsell-toggle span { left: auto; right: 2px; }
.shi-bw-upsell-img {
	width: 100%; aspect-ratio: 1/1; border-radius: 10px; overflow: hidden;
	background: repeating-linear-gradient(45deg,#eef1ef,#eef1ef 6px,#e6eae7 6px,#e6eae7 12px);
	margin-bottom: clamp(6px, 1.6vw, 8px);
}
.shi-bw-upsell-img img { width: 100%; height: 100%; object-fit: cover; }
.shi-bw-upsell-name {
	font-size: clamp(11px, 2.6vw, 13px); font-weight: 700; line-height: 1.2; margin-bottom: 4px;
	min-height: 2.4em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.shi-bw-upsell-price { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: center; gap: 4px; margin-bottom: auto; }
.shi-bw-upsell-price strong { font-size: clamp(12px, 2.8vw, 14px); font-weight: 800; color: var(--shi-accent); }
.shi-bw-upsell-price del { font-size: clamp(10px, 2.3vw, 12px); color: #9aa0a3; }
.shi-bw-qty {
	display: flex; align-items: center; border: 1px solid #d7dcd8;
	border-radius: 8px; overflow: hidden; height: clamp(30px, 8vw, 34px); margin-top: clamp(6px, 1.6vw, 8px);
}
.shi-bw-qty button { flex: none; width: clamp(26px, 8vw, 34px); height: 100%; border: none; background: #fff; font-size: clamp(15px, 4vw, 18px); cursor: pointer; padding: 0; }
.shi-bw-qty-val { flex: 1; min-width: 0; text-align: center; font-size: clamp(12px, 3vw, 14px); font-weight: 700; }

/* Savings */
.shi-bw-savings {
	display: flex; align-items: center; justify-content: center; gap: 8px;
	margin-top: 20px; color: var(--shi-accent); font-weight: 700; font-size: 15px;
}

/* CTA */
.shi-bw-cta {
	position: relative; overflow: hidden; margin-top: 20px; width: 100%; height: 58px;
	border: none; border-radius: var(--shi-radius); background: var(--shi-btn-bg);
	color: var(--shi-btn-fg); font-family: inherit; font-size: 17px; font-weight: 800;
	letter-spacing: .5px; cursor: pointer; box-shadow: 0 8px 22px rgba(28,90,63,.28);
	transition: transform .15s, box-shadow .2s, background .2s;
	-webkit-tap-highlight-color: transparent;
}
.shi-bw-cta:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(28,90,63,.36); }
.shi-bw-cta:active { transform: translateY(0) scale(.985); }
.shi-bw-cta[data-state="loading"],
.shi-bw-cta[data-state="success"] { cursor: default; transform: none; }
.shi-bw-cta[data-state="success"] { background: #17492f; }
.shi-bw-cta-label { display: flex; align-items: center; justify-content: center; gap: 10px; position: relative; z-index: 1; }
.shi-bw-cta-shine {
	position: absolute; top: 0; left: 0; height: 100%; width: 38%; pointer-events: none;
	background: linear-gradient(100deg, rgba(255,255,255,0), rgba(255,255,255,.42), rgba(255,255,255,0));
	animation: shi-bw-shine 6.5s ease-in-out infinite;
}
.shi-bw-cta[data-shine="off"] .shi-bw-cta-shine,
.shi-bw-cta[data-state="loading"] .shi-bw-cta-shine,
.shi-bw-cta[data-state="success"] .shi-bw-cta-shine { display: none; }
.shi-bw-spinner {
	width: 20px; height: 20px; border-radius: 50%;
	border: 2.5px solid rgba(255,255,255,.35); border-top-color: #fff;
	animation: shi-bw-spin .7s linear infinite;
}
@keyframes shi-bw-shine { 0% { transform: translateX(-120%); } 60%,100% { transform: translateX(360%); } }
@keyframes shi-bw-spin { to { transform: rotate(360deg); } }

/* Mobile — keep 3-up upsells, tighten everything to feel premium on phones */
@media (max-width: 560px) {
	.shi-bundle-widget { margin: 16px 0; }
	.shi-bw-title { font-size: 14px; margin-bottom: 14px; }
	.shi-bw-tier { padding: 13px 14px; gap: 10px; }
	.shi-bw-tier-title { font-size: 15px; }
	.shi-bw-now { font-size: 15px; }
	.shi-bw-tiers { gap: 10px; }
	.shi-bw-plan { gap: 8px; }
	.shi-bw-plan-opt { padding: 12px 10px; }
	.shi-bw-plan-title { font-size: 14px; }
	.shi-bw-upsells { margin-top: 18px; gap: 6px; }
	.shi-bw-cta { height: 54px; font-size: 16px; }
}
@media (max-width: 380px) {
	.shi-bw-plan.is-stacked { flex-direction: column; }
	.shi-bw-upsell-name { font-size: 10.5px; }
}
@media (prefers-reduced-motion: reduce) {
	.shi-bw-cta-shine, .shi-bw-spinner { animation: none; }
}
