/* =========================================================================
   BioPex Build-a-Box — Concept 3 V2 design.
   Everything is scoped to .bpxb so theme / Elementor styles stay untouched,
   and theme button styles (e.g. Hello Elementor's pink buttons) can't leak in.
   Colours and fonts are provisional until the brand guide is approved.
   ========================================================================= */

.bpxb {
	--bpxb-ink: #0E1726;
	--bpxb-navy: #1B2B45;
	--bpxb-mist: #F3F5F7;
	--bpxb-mist-2: #E7EBEF;
	--bpxb-line: #E1E5EA;
	--bpxb-field: #CDD3DA;
	--bpxb-slate: #5A6472;
	--bpxb-steel: #3E5675;
	--bpxb-ok: #2B6A4F;
	--bpxb-ok-bg: #E6F1EB;
	--bpxb-img-bg: #DDE1E6;
	--bpxb-r: 12px;
	--bpxb-rs: 8px;
	--bpxb-max: 1360px;
	--bpxb-gutter: clamp(16px, 4vw, 56px);
	--bpxb-sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
	--bpxb-display: 'Inter Tight', 'Inter', system-ui, sans-serif;
	--bpxb-mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

	display: flex;
	flex-direction: column;
	width: 100%;
	font-family: var(--bpxb-sans);
	font-size: 16px;
	line-height: 1.5;
	color: var(--bpxb-ink);
	-webkit-font-smoothing: antialiased;
	text-align: left;
}
.bpxb > * { width: 100%; }
.bpxb *, .bpxb *::before, .bpxb *::after { box-sizing: border-box; }
.bpxb img { max-width: 100%; display: block; }
.bpxb a { color: inherit; }
.bpxb :focus-visible { outline: 2px solid var(--bpxb-steel); outline-offset: 2px; }
.bpxb [hidden] { display: none !important; }
body.bpxb-page { overflow-x: clip; }

.bpxb-wrap {
	max-width: var(--bpxb-max);
	margin-left: auto;
	margin-right: auto;
	padding-left: var(--bpxb-gutter);
	padding-right: var(--bpxb-gutter);
}

/* ---------- type ---------- */
.bpxb .bpxb-eyebrow {
	margin: 0 0 18px; font-size: 13px; font-weight: 600; letter-spacing: .12em;
	text-transform: uppercase; color: var(--bpxb-steel); line-height: 1.4;
}
.bpxb .bpxb-d1,
.bpxb .bpxb-d2 {
	font-family: var(--bpxb-display); font-weight: 600; margin: 0; color: var(--bpxb-ink); text-transform: none;
}
.bpxb .bpxb-d1 { font-size: clamp(44px, 5.6vw, 84px); line-height: .95; letter-spacing: -.045em; }
.bpxb .bpxb-d2 { font-size: clamp(34px, 4.8vw, 68px); line-height: 1; letter-spacing: -.04em; }

/* ---------- buttons (reset theme styles first) ---------- */
.bpxb button { font-family: inherit; text-transform: none; letter-spacing: 0; box-shadow: none; }
.bpxb .bpxb-btn,
.bpxb .bpxb-btn:hover,
.bpxb .bpxb-btn:focus {
	display: inline-flex; align-items: center; justify-content: center; gap: 10px;
	min-height: 52px; margin: 0; padding: 0 26px;
	border: 1px solid transparent; border-radius: var(--bpxb-rs);
	font: 600 15px/1.2 var(--bpxb-sans); text-decoration: none; text-transform: none; letter-spacing: 0; white-space: nowrap;
	box-shadow: none; cursor: pointer; transition: background-color .15s, color .15s, border-color .15s;
}
.bpxb .bpxb-btn-dark,
.bpxb .bpxb-btn-dark:focus { background: var(--bpxb-ink); border-color: var(--bpxb-ink); color: #fff; }
.bpxb .bpxb-btn-dark:hover { background: var(--bpxb-navy); border-color: var(--bpxb-navy); color: #fff; }
.bpxb .bpxb-btn-line,
.bpxb .bpxb-btn-line:focus { background: #fff; border-color: var(--bpxb-field); color: var(--bpxb-ink); }
.bpxb .bpxb-btn-line:hover { background: #fff; border-color: var(--bpxb-ink); color: var(--bpxb-ink); }
.bpxb .bpxb-btn-sm,
.bpxb .bpxb-btn-sm:hover,
.bpxb .bpxb-btn-sm:focus { min-height: 42px; padding: 0 16px; font-size: 14px; }
.bpxb .bpxb-btn-block { width: 100%; }
.bpxb .bpxb-btn.is-busy { opacity: .7; cursor: progress; }
.bpxb .bpxb-btn-dark.is-off,
.bpxb .bpxb-btn-dark.is-off:hover { background: #B7BFC9; border-color: #B7BFC9; color: #fff; cursor: not-allowed; }
.bpxb .bpxb-btn-line.is-off,
.bpxb .bpxb-btn-line.is-off:hover { background: #fff; border-color: var(--bpxb-line); color: #9AA3AF; cursor: not-allowed; }

/* ---------- crumbs + head ---------- */
.bpxb .bpxb-crumbs {
	display: flex; flex-wrap: wrap; gap: 4px 8px; list-style: none;
	margin: 0; padding: 22px 0 0; font-size: 13.5px; color: var(--bpxb-slate);
}
.bpxb .bpxb-crumbs li { margin: 0; padding: 0; }
.bpxb .bpxb-crumbs li + li::before { content: "/"; margin-right: 8px; color: #A6AEB8; }
.bpxb .bpxb-crumbs a { color: var(--bpxb-slate); text-decoration: none; }
.bpxb .bpxb-crumbs a:hover { color: var(--bpxb-ink); }

.bpxb .bpxb-head {
	display: grid;
	grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr);
	gap: clamp(32px, 5vw, 80px);
	align-items: center;
	padding-top: 20px;
}
.bpxb .bpxb-head.no-hero { grid-template-columns: minmax(0, 1fr); padding-top: clamp(32px, 4vw, 56px); }
.bpxb .bpxb-short { margin: 16px 0 0; max-width: 34em; color: var(--bpxb-slate); font-size: 18px; line-height: 1.65; }
.bpxb .bpxb-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.bpxb .bpxb-chips span {
	display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 14px;
	border-radius: 999px; background: var(--bpxb-mist); font-size: 14px; font-weight: 500;
}
.bpxb .bpxb-chips i {
	font-style: normal; width: 20px; height: 20px; border-radius: 50%; background: var(--bpxb-ink); color: #fff;
	font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center;
}
.bpxb .bpxb-hero { border-radius: var(--bpxb-r); overflow: hidden; aspect-ratio: 4 / 3; background: var(--bpxb-img-bg); }
.bpxb .bpxb-hero img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 55%; }

/* ---------- tray ("Your box") ---------- */
.bpxb .bpxb-tray {
	position: sticky;
	top: var(--bpxb-top, 0px);
	z-index: 40;
	width: 100vw;
	max-width: none;
	margin: clamp(40px, 5vw, 64px) calc(50% - 50vw) 0;
	background: rgba(255, 255, 255, .97);
	-webkit-backdrop-filter: blur(8px);
	backdrop-filter: blur(8px);
	border-top: 1px solid var(--bpxb-line);
	border-bottom: 1px solid var(--bpxb-line);
	box-shadow: 0 16px 32px -28px rgba(14, 23, 38, .4);
}
.bpxb .bpxb-tray-in {
	display: grid;
	grid-template-columns: 200px minmax(0, 1fr) auto;
	gap: 28px;
	align-items: center;
	padding-top: 18px;
	padding-bottom: 18px;
}
.bpxb .bpxb-tray-l b { display: block; font-family: var(--bpxb-display); font-size: 24px; font-weight: 600; letter-spacing: -.02em; line-height: 1.2; }
.bpxb .bpxb-tray-l span { display: block; margin-top: 4px; font-size: 14px; color: var(--bpxb-slate); }
.bpxb .bpxb-tray-l span.is-ok { color: var(--bpxb-ok); font-weight: 600; }

.bpxb .bpxb-slots { display: grid; grid-template-columns: repeat(var(--bpxb-n, 4), minmax(0, 1fr)); gap: 12px; }
.bpxb .bpxb-slot {
	position: relative;
	display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 12px; align-items: center;
	min-height: 80px; padding: 10px 12px;
	border: 1.5px dashed #AEB6C1; border-radius: var(--bpxb-rs); background: var(--bpxb-mist);
	transition: border-color .15s, background-color .15s;
}
.bpxb .bpxb-slot .bpxb-num {
	width: 56px; height: 56px; border-radius: 6px; border: 1.5px dashed #AEB6C1; background: #fff;
	display: flex; align-items: center; justify-content: center;
	font-family: var(--bpxb-display); font-size: 22px; font-weight: 600; color: #8D97A4;
}
.bpxb .bpxb-slot .bpxb-lb { min-width: 0; font-size: 13.5px; line-height: 1.35; color: var(--bpxb-slate); }
.bpxb .bpxb-slot .bpxb-lb b { display: block; font-size: 14px; font-weight: 600; color: var(--bpxb-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bpxb .bpxb-slot.is-next { border-color: var(--bpxb-ink); background: #fff; }
.bpxb .bpxb-slot.is-next .bpxb-num { border-color: var(--bpxb-ink); color: var(--bpxb-ink); }
.bpxb .bpxb-slot.is-full { border: 1.5px solid var(--bpxb-ink); background: #fff; }
.bpxb .bpxb-slot.is-full img { width: 56px; height: 56px; border-radius: 6px; object-fit: cover; object-position: 68% 50%; background: var(--bpxb-img-bg); }
.bpxb .bpxb-slot .bpxb-x,
.bpxb .bpxb-slot .bpxb-x:hover,
.bpxb .bpxb-slot .bpxb-x:focus {
	position: absolute; top: -9px; right: -9px;
	width: 24px; height: 24px; min-height: 0; margin: 0; padding: 0;
	border: 0; border-radius: 50%; background: var(--bpxb-ink); color: #fff;
	font: 400 15px/1 var(--bpxb-sans); text-transform: none; letter-spacing: 0; box-shadow: none; cursor: pointer;
	display: flex; align-items: center; justify-content: center;
}
.bpxb .bpxb-slot .bpxb-x:hover { background: var(--bpxb-navy); }
.bpxb .bpxb-slot.is-pop { animation: bpxb-pop .28s ease; }
@keyframes bpxb-pop { 0% { transform: scale(.94); } 60% { transform: scale(1.02); } 100% { transform: scale(1); } }

.bpxb .bpxb-tray-r { display: grid; gap: 10px; justify-items: end; }
.bpxb .bpxb-tot { text-align: right; line-height: 1.25; }
.bpxb .bpxb-tot s { margin-right: 6px; font-size: 14px; color: var(--bpxb-slate); }
.bpxb .bpxb-tot b { font-size: 24px; font-weight: 600; letter-spacing: -.02em; }
.bpxb .bpxb-tot small { display: block; font-size: 12.5px; color: var(--bpxb-slate); }
.bpxb .bpxb-tray .bpxb-go { min-width: 220px; }

.bpxb .bpxb-seg { display: inline-grid; grid-template-columns: 1fr 1fr; padding: 3px; border-radius: var(--bpxb-rs); background: var(--bpxb-mist); }
.bpxb .bpxb-seg button,
.bpxb .bpxb-seg button:hover,
.bpxb .bpxb-seg button:focus {
	min-height: 36px; margin: 0; padding: 0 14px; border: 0; border-radius: 6px;
	background: none; color: var(--bpxb-slate); font: 600 13.5px/1 var(--bpxb-sans); text-transform: none; letter-spacing: 0; cursor: pointer;
}
.bpxb .bpxb-seg button:hover { color: var(--bpxb-ink); }
.bpxb .bpxb-seg button.is-on,
.bpxb .bpxb-seg button.is-on:hover { background: #fff; color: var(--bpxb-ink); box-shadow: 0 1px 2px rgba(14, 23, 38, .1); }

/* ---------- product grid ---------- */
.bpxb .bpxb-pick { padding-top: clamp(40px, 5vw, 64px); }
.bpxb .bpxb-sec-head {
	display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end;
	gap: 16px 32px; margin-bottom: clamp(32px, 4vw, 56px);
}
.bpxb .bpxb-note { margin: 0; color: var(--bpxb-slate); }
.bpxb .bpxb-none { margin: 0; padding: 48px 24px; border-radius: var(--bpxb-r); background: var(--bpxb-mist); text-align: center; color: var(--bpxb-slate); }

.bpxb .bpxb-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 44px 24px; }
.bpxb .bpxb-pc { display: flex; flex-direction: column; min-width: 0; }
.bpxb .bpxb-pc-img {
	position: relative; display: block; aspect-ratio: 1 / 1; overflow: hidden;
	border-radius: var(--bpxb-r); background: var(--bpxb-img-bg);
	outline: 0 solid var(--bpxb-ink); outline-offset: -3px; transition: outline-width .12s;
}
.bpxb .bpxb-pc-img img { width: 100%; height: 100%; object-fit: cover; object-position: 68% 50%; transition: transform .5s ease; }
.bpxb .bpxb-pc:hover .bpxb-pc-img img { transform: scale(1.03); }
.bpxb .bpxb-pc.is-in .bpxb-pc-img { outline-width: 3px; }
.bpxb .bpxb-pc.is-out .bpxb-pc-img img { opacity: .55; }
.bpxb .bpxb-badge {
	position: absolute; top: 12px; left: 12px; z-index: 2;
	padding: 5px 9px; border-radius: 6px; background: var(--bpxb-ink); color: #fff;
	font-size: 12px; font-weight: 600; line-height: 1.3;
}
.bpxb .bpxb-badge.is-light { background: #fff; color: var(--bpxb-ink); }
.bpxb .bpxb-pc h3 { margin: 16px 0 0; font-family: var(--bpxb-sans); font-size: 17px; font-weight: 600; letter-spacing: -.01em; line-height: 1.3; color: var(--bpxb-ink); text-transform: none; }
.bpxb .bpxb-pc h3 a { text-decoration: none; color: inherit; }
.bpxb .bpxb-pc h3 a:hover { text-decoration: underline; text-underline-offset: 3px; }
.bpxb .bpxb-sz { margin: 4px 0 0; font: 12.5px/1.4 var(--bpxb-mono); color: var(--bpxb-slate); }
.bpxb .bpxb-pr { margin: 10px 0 0; font-size: 16px; font-weight: 600; line-height: 1.4; }
.bpxb .bpxb-pr small { font-size: 13px; font-weight: 400; color: var(--bpxb-slate); }
.bpxb .bpxb-pc .bpxb-add { margin-top: auto; }
.bpxb .bpxb-pc .bpxb-pr + .bpxb-add,
.bpxb .bpxb-pc .bpxb-add { margin-top: 14px; }

/* ---------- FAQ ---------- */
.bpxb .bpxb-faq {
	display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(32px, 5vw, 96px);
	padding-top: clamp(72px, 9vw, 136px); padding-bottom: clamp(72px, 9vw, 136px);
}
.bpxb .bpxb-faq details { border-top: 1px solid var(--bpxb-line); }
.bpxb .bpxb-faq details:last-child { border-bottom: 1px solid var(--bpxb-line); }
.bpxb .bpxb-faq summary {
	list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px;
	min-height: 68px; font-size: 18px; font-weight: 600; color: var(--bpxb-ink);
}
.bpxb .bpxb-faq summary::-webkit-details-marker { display: none; }
.bpxb .bpxb-faq summary::after { content: "+"; flex: none; font-size: 22px; font-weight: 400; color: var(--bpxb-slate); }
.bpxb .bpxb-faq details[open] summary::after { content: "−"; }
.bpxb .bpxb-faq details p { margin: 0 0 22px; max-width: 44em; color: var(--bpxb-slate); font-size: 16px; line-height: 1.65; }

/* ---------- toast ---------- */
.bpxb .bpxb-toast-region {
	position: fixed; left: 0; right: 0; bottom: var(--bpxb-toast-bottom, 24px); z-index: 99990;
	display: flex; justify-content: center; padding: 0 16px; pointer-events: none;
}
.bpxb .bpxb-toast {
	display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px;
	max-width: 560px; padding: 14px 20px; border-radius: var(--bpxb-rs);
	background: var(--bpxb-ink); color: #fff; font-size: 14.5px; line-height: 1.45;
	box-shadow: 0 12px 32px -12px rgba(14, 23, 38, .5); pointer-events: auto;
	animation: bpxb-in .2s ease;
}
.bpxb .bpxb-toast.is-ok { background: var(--bpxb-ok); }
.bpxb .bpxb-toast a { color: #fff; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
@keyframes bpxb-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
	.bpxb .bpxb-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.bpxb .bpxb-tray-in { grid-template-columns: minmax(0, 1fr) auto; }
	.bpxb .bpxb-tray-l { grid-column: 1 / -1; display: flex; align-items: baseline; gap: 14px; }
	.bpxb .bpxb-tray-l span { margin: 0; }
}
@media (max-width: 1023px) {
	.bpxb .bpxb-head,
	.bpxb .bpxb-faq { grid-template-columns: minmax(0, 1fr); }
	.bpxb .bpxb-faq { gap: 16px; }
	.bpxb .bpxb-hero { aspect-ratio: 16 / 9; }

	/* the box bar moves to the bottom of the screen */
	.bpxb .bpxb-tray {
		order: 9; top: auto; bottom: 0; margin-top: 0; border-bottom: 0;
		box-shadow: 0 -12px 32px -20px rgba(14, 23, 38, .4);
	}
	.bpxb .bpxb-tray-in { grid-template-columns: minmax(0, 1fr); gap: 10px; padding-top: 12px; padding-bottom: 12px; }
	.bpxb .bpxb-tray-l { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
	.bpxb .bpxb-tray-l b { font-size: 18px; }
	.bpxb .bpxb-tray-l span { font-size: 13px; text-align: right; }
	.bpxb .bpxb-slots { gap: 10px; }
	.bpxb .bpxb-slot { grid-template-columns: 44px minmax(0, 1fr); gap: 10px; min-height: 64px; padding: 8px 10px; }
	.bpxb .bpxb-slot .bpxb-num,
	.bpxb .bpxb-slot.is-full img { width: 44px; height: 44px; }
	.bpxb .bpxb-slot .bpxb-num { font-size: 18px; }
	.bpxb .bpxb-slot .bpxb-lb { font-size: 12.5px; }
	.bpxb .bpxb-slot .bpxb-lb b { font-size: 13px; }
	.bpxb .bpxb-tray-r { grid-template-columns: auto minmax(0, 1fr); align-items: center; justify-items: stretch; gap: 10px; }
	.bpxb .bpxb-tot { text-align: left; }
	.bpxb .bpxb-tot b { font-size: 19px; }
	.bpxb .bpxb-seg { grid-column: 1 / -1; order: -1; }
	.bpxb .bpxb-tray .bpxb-go,
	.bpxb .bpxb-tray .bpxb-go:hover { min-width: 0; min-height: 48px; padding: 0 16px; }
}
@media (max-width: 640px) {
	.bpxb .bpxb-slots { gap: 8px; }
	.bpxb .bpxb-slot { grid-template-columns: minmax(0, 1fr); justify-items: center; min-height: 0; padding: 6px; }
	.bpxb .bpxb-slot .bpxb-num,
	.bpxb .bpxb-slot.is-full img { width: 100%; height: auto; aspect-ratio: 1 / 1; max-width: 72px; }
	.bpxb .bpxb-slot .bpxb-lb { display: none; }
	.bpxb .bpxb-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 12px; }
	.bpxb .bpxb-pc h3 { margin-top: 12px; font-size: 15px; }
	.bpxb .bpxb-pr { margin-top: 6px; font-size: 15px; }
	.bpxb .bpxb-pc .bpxb-add,
	.bpxb .bpxb-pc .bpxb-add:hover { padding: 0 10px; font-size: 13.5px; }
	.bpxb .bpxb-badge { top: 8px; left: 8px; padding: 4px 7px; font-size: 11px; }
	.bpxb .bpxb-d2 { font-size: 36px; }
	.bpxb .bpxb-short { font-size: 16.5px; }
	.bpxb .bpxb-faq { padding-top: 64px; padding-bottom: 64px; }
	.bpxb .bpxb-faq summary { min-height: 60px; font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
	.bpxb *, .bpxb *::before, .bpxb *::after { transition: none !important; animation: none !important; }
}
