/* B.TECH Magazine */
.bm {
	--bm-orange: #F26B1D;
	--bm-orange-soft: #F7A46B;
	--bm-yellow: #FFD21F;
	--bm-ink: #111111;
	--bm-line: #DDD6CC;
	--bm-muted: #6B645C;
	max-width: 1240px;
	margin: 0 auto;
	color: #141414;
	font-family: 'Cairo', system-ui, sans-serif;
	line-height: 1.6;
	box-sizing: border-box;
}
.bm *, .bm *::before, .bm *::after { box-sizing: border-box; }
.bm button {
	font-family: inherit;
	text-transform: none;
	letter-spacing: normal;
	margin: 0;
	min-height: 0;
	box-shadow: none;
	cursor: pointer;
}
.bm svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.1; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }
.bm [hidden] { display: none !important; }

/* sections */
.bm-sections { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 0 0 16px; }
.bm-sections__label { flex: none; white-space: nowrap; font-size: 14px; font-weight: 700; color: var(--bm-muted); margin-inline-end: 4px; }
.bm .bm-chip {
	display: inline-flex; align-items: center; gap: 6px;
	padding: 7px 14px; border-radius: 999px;
	border: 1px solid var(--bm-line); background: #fff; color: #3A3530;
	font-size: 14px; font-weight: 600; line-height: 1.4;
}
.bm .bm-chip:hover { border-color: var(--bm-ink); color: var(--bm-ink); background: #fff; }
.bm .bm-chip.is-active { background: var(--bm-ink); border-color: var(--bm-ink); color: #fff; font-weight: 800; }
.bm-chip__num { color: #7A7268; font-weight: 600; }
.bm .bm-chip.is-active .bm-chip__num { color: var(--bm-orange-soft); }

/* stage */
.bm-stage { position: relative; background: #1B1B1B; border-radius: 20px; padding: 28px 72px; }
.bm-book-wrap { outline: none; border-radius: 4px; touch-action: pan-y; user-select: none; -webkit-user-select: none; cursor: grab; }
.bm-book-wrap:active { cursor: grabbing; }
.bm-book-wrap:focus-visible { box-shadow: 0 0 0 3px var(--bm-orange); }
.bm-book { margin: 0 auto; }
.bm .bm-nav {
	position: absolute; top: 50%; transform: translateY(-50%); z-index: 5;
	width: 48px; height: 48px; padding: 0; border: 0; border-radius: 999px;
	display: flex; align-items: center; justify-content: center;
	background: #2E2E2E; color: #fff;
}
.bm .bm-nav svg { width: 24px; height: 24px; stroke-width: 2.4; }
.bm .bm-nav--back { right: 14px; }
.bm .bm-nav--fwd { left: 14px; background: var(--bm-orange); color: var(--bm-ink); }
.bm .bm-nav:hover { filter: brightness(1.12); }
.bm .bm-nav:disabled { opacity: .3; cursor: default; filter: none; }
.bm-preview-flag {
	position: absolute; top: 8px; right: 50%; transform: translateX(50%);
	background: #fff; color: var(--bm-ink); font-size: 12px; font-weight: 700;
	padding: 2px 12px; border-radius: 999px; z-index: 6;
}

/* page */
.bm-page { background: var(--bm-orange); container-type: inline-size; overflow: hidden; }
.bm-page img { display: block; width: 100%; height: 100%; object-fit: cover; user-select: none; -webkit-user-drag: none; pointer-events: none; }
.bm-hs-layer, .bm-hs { position: absolute; inset: 0; pointer-events: none; }
.bm-hs__box {
	position: absolute; border: 3px solid #fff; border-radius: 2.6cqw;
	box-shadow: 0 0 0 4px rgba(17, 17, 17, .3);
	opacity: 0; transition: opacity .15s ease;
}
.bm-hs:hover .bm-hs__box, .bm-hs:focus-within .bm-hs__box { opacity: 1; }

/* desktop button: white floating pill with an orange cart circle (option A) */
.bm .bm-pill {
	--bm-h: clamp(26px, 3.9cqw, 34px);
	--bm-in: 5px;
	position: absolute; z-index: 3; pointer-events: auto;
	transform: translate(calc(-100% - var(--bm-in)), calc(-100% - var(--bm-in)));
	display: inline-flex; align-items: center; gap: 5px;
	height: var(--bm-h); padding: 0 3px 0 10px; padding-inline: 10px 3px;
	font-family: 'Cairo', system-ui, sans-serif; font-size: clamp(11px, 1.55cqw, 14px); font-weight: 800;
	line-height: 1; white-space: nowrap; text-decoration: none;
	color: var(--bm-ink); background: #fff; border: 0; border-radius: 999px;
	box-shadow: 0 4px 12px rgba(0, 0, 0, .4);
	transition: color .15s ease, background-color .15s ease, transform .15s ease;
}
.bm .bm-pill__ic {
	flex: none; width: calc(var(--bm-h) - 6px); height: calc(var(--bm-h) - 6px); border-radius: 999px;
	display: inline-flex; align-items: center; justify-content: center;
	background: var(--bm-orange); color: var(--bm-ink);
}
.bm .bm-pill__ic svg { width: 58%; height: 58%; stroke-width: 2.4; }
/* top-corner buttons hang down from the top edge */
.bm .bm-hs--tr .bm-pill, .bm .bm-hs--tl .bm-pill { transform: translate(calc(-100% - var(--bm-in)), var(--bm-in)); }
.bm .bm-hs--tl .bm-pill { transform: translate(calc(-100% + var(--bm-in)), var(--bm-in)); }
.bm .bm-hs--bl .bm-pill { transform: translate(calc(-100% + var(--bm-in)), calc(-100% - var(--bm-in))); }
/* lifted: sits just above the price row when it doesn't fit beside it */
.bm .bm-pill.is-lifted { transform: translate(calc(-100% - var(--bm-in)), -100%); }
/* compact: just the cart circle, for narrow cards */
.bm .bm-hs--compact .bm-pill { width: var(--bm-h); padding: 0; justify-content: center; }
.bm .bm-pill:hover, .bm .bm-pill:focus-visible { background: var(--bm-ink); color: #fff; outline: none; }
.bm .bm-pill:focus-visible { box-shadow: 0 0 0 3px #fff, 0 0 0 6px var(--bm-orange); }
.bm-tip {
	position: absolute; bottom: calc(100% + 10px); right: 0;
	width: max-content; max-width: 240px;
	display: flex; flex-direction: column; gap: 3px;
	padding: 10px 12px; border-radius: 12px;
	background: var(--bm-ink); color: #fff; text-align: right; white-space: normal;
	box-shadow: 0 10px 28px rgba(0, 0, 0, .45);
	opacity: 0; transform: translateY(4px); transition: opacity .15s ease, transform .15s ease;
	pointer-events: none;
}
.bm .bm-pill:hover .bm-tip, .bm .bm-pill:focus-visible .bm-tip { opacity: 1; transform: none; }
.bm .bm-hs--tr .bm-tip, .bm .bm-hs--tl .bm-tip { bottom: auto; top: calc(100% + 10px); }
.bm-tip__name { font-size: 13px; font-weight: 700; line-height: 1.5; }
.bm-tip__price { font-size: 16px; font-weight: 900; color: var(--bm-orange-soft); }
.bm-tip__site { font-size: 11px; color: #B9B2A9; font-weight: 600; }

/* phones / tablets: white circle with an orange cart, same corner */
.bm .bm-dot {
	display: none; position: absolute; z-index: 3; pointer-events: auto;
	transform: translate(calc(-100% - 3px), calc(-100% - 3px));
	width: 30px; height: 30px; padding: 0; border: 0; border-radius: 999px;
	align-items: center; justify-content: center;
	color: var(--bm-orange); background: #fff;
	box-shadow: 0 3px 8px rgba(0, 0, 0, .4);
}
.bm .bm-hs--tr .bm-dot { transform: translate(calc(-100% - 3px), 3px); }
.bm .bm-hs--tl .bm-dot { transform: translate(calc(-100% + 3px), 3px); }
.bm .bm-hs--bl .bm-dot { transform: translate(calc(-100% + 3px), calc(-100% - 3px)); }
.bm .bm-dot::after { content: ""; position: absolute; inset: -8px; border-radius: 999px; } /* 46px touch area */
.bm .bm-dot svg { width: 15px; height: 15px; stroke-width: 2.6; }
.bm .bm-dot:active { background: var(--bm-ink); color: #fff; }
.bm.bm--dots .bm-pill { display: none; }
.bm.bm--dots .bm-dot { display: flex; }
.bm.bm--dots .bm-hs__box { display: none; }

/* two pulses when a page opens */
@keyframes bm-pulse {
	0% { box-shadow: 0 0 0 0 rgba(255, 255, 255, .95), 0 6px 16px rgba(0, 0, 0, .45); }
	70% { box-shadow: 0 0 0 14px rgba(255, 255, 255, 0), 0 6px 16px rgba(0, 0, 0, .45); }
	100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0), 0 6px 16px rgba(0, 0, 0, .45); }
}
.bm .is-pulsing { animation: bm-pulse 1.7s ease-out 2; }
@media (prefers-reduced-motion: reduce) { .bm .is-pulsing { animation: none; } }

/* hint bar above the magazine */
.bm-hint {
	display: flex; align-items: center; justify-content: space-between; gap: 12px 16px; flex-wrap: wrap;
	margin: 0 0 14px; padding: 12px 18px; border-radius: 14px;
	background: var(--bm-ink); color: #fff;
}
.bm-hint__text { font-size: 15px; font-weight: 700; line-height: 1.6; }
.bm-hint__sample {
	flex: none; display: inline-flex; align-items: center; gap: 6px; height: 34px; padding-inline: 12px 4px;
	border-radius: 999px; background: #fff; color: var(--bm-ink); font-size: 13px; font-weight: 800; white-space: nowrap;
}
.bm-hint__sample .bm-pill__ic { width: 26px; height: 26px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; background: var(--bm-orange); }
.bm-hint__sample svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

/* unlinked buttons, admin preview only */
.bm .bm-hs--unlinked .bm-pill, .bm .bm-hs--unlinked .bm-dot {
	background: rgba(255, 255, 255, .85); color: var(--bm-ink); outline: 2px dashed var(--bm-ink); outline-offset: -2px; box-shadow: none;
}
.bm .bm-hs--unlinked .bm-pill__ic { display: none; }

/* bar */
.bm-bar { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px 16px; padding: 14px 4px 0; }
.bm-bar__pos { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.bm-pos { font-size: 16px; font-weight: 800; }
.bm-pos span { color: #7A7268; font-weight: 600; }
.bm-progress { width: 200px; height: 6px; background: var(--bm-line); border-radius: 999px; overflow: hidden; }
.bm-progress__fill { display: block; height: 100%; width: 0; background: var(--bm-orange); border-radius: 999px; transition: width .3s ease; }
.bm-bar__tools { display: flex; gap: 8px; }
.bm .bm-tool {
	min-width: 44px; height: 44px; padding: 0 12px; border-radius: 12px;
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	border: 1px solid var(--bm-line); background: #fff; color: #3A3530;
	font-size: 14px; font-weight: 700; text-decoration: none;
}
.bm .bm-tool:hover { border-color: var(--bm-ink); color: var(--bm-ink); background: #fff; }
.bm .bm-tool.is-done { border-color: #1E7B45; color: #1E7B45; }
.bm-note { margin: 8px 4px 0; font-size: 13px; color: var(--bm-muted); }

/* product list */
.bm-products { padding: 36px 0 8px; }
.bm .bm-products__title { margin: 0 0 16px; font-size: 24px; font-weight: 900; line-height: 1.4; }
.bm-products__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.bm-product { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 16px; background: #fff; border: 1px solid #E4DED6; border-radius: 16px; }
.bm .bm-product__name { margin: 0; font-size: 15px; font-weight: 700; line-height: 1.6; }
.bm-product__prices { display: flex; align-items: baseline; gap: 10px; }
.bm-product__price { font-size: 20px; font-weight: 900; }
.bm-product__old { font-size: 14px; color: #7A7268; }
.bm .bm-product__buy {
	margin-top: auto; height: 44px; border-radius: 12px;
	display: flex; align-items: center; justify-content: center;
	background: var(--bm-ink); color: #fff; border: 0;
	font-size: 15px; font-weight: 800; text-decoration: none;
}
.bm .bm-product__buy:hover { background: var(--bm-orange); color: var(--bm-ink); }
.bm-product__page { font-size: 12px; color: var(--bm-muted); }

/* bottom sheet */
.bm-sheet { position: fixed; inset: 0; z-index: 100000; }
.bm-sheet__scrim { position: absolute; inset: 0; background: rgba(0, 0, 0, .5); opacity: 0; transition: opacity .2s ease; }
.bm-sheet__panel {
	position: absolute; left: 0; right: 0; bottom: 0; margin: 0 auto; max-width: 520px;
	display: flex; flex-direction: column; gap: 16px;
	padding: 10px 18px calc(22px + env(safe-area-inset-bottom));
	background: #fff; color: #141414; border-radius: 22px 22px 0 0;
	box-shadow: 0 -10px 30px rgba(0, 0, 0, .35);
	transform: translateY(100%); transition: transform .22s ease;
}
.bm-sheet.is-open .bm-sheet__scrim { opacity: 1; }
.bm-sheet.is-open .bm-sheet__panel { transform: none; }
.bm-sheet__handle { width: 44px; height: 5px; border-radius: 999px; background: #D6CFC5; margin: 0 auto; }
.bm-sheet__row { display: flex; gap: 14px; align-items: flex-start; }
.bm-sheet__thumb { flex: none; width: 96px; border-radius: 12px; background-color: var(--bm-orange); background-repeat: no-repeat; }
.bm-sheet__info { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.bm .bm-sheet__title { margin: 0; font-size: 17px; font-weight: 800; line-height: 1.5; }
.bm-sheet__prices { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.bm-sheet__price { font-size: 24px; font-weight: 900; }
.bm-sheet__old { font-size: 14px; color: #7A7268; }
.bm .bm-sheet__buy {
	display: flex; align-items: center; justify-content: center; gap: 10px;
	height: 54px; border-radius: 14px; background: var(--bm-ink); color: #fff;
	border: 0; font-size: 17px; font-weight: 800; text-decoration: none;
}
.bm .bm-sheet__buy svg { color: var(--bm-orange); }
.bm .bm-sheet__buy svg { width: 20px; height: 20px; }
.bm .bm-sheet__buy:hover, .bm .bm-sheet__buy:focus-visible { background: var(--bm-orange); color: var(--bm-ink); outline: none; }
.bm .bm-sheet__buy:hover svg { color: var(--bm-ink); }
.bm-sheet__foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 12px; color: var(--bm-muted); }
.bm .bm-sheet__close { height: 44px; padding: 0 16px; border-radius: 12px; border: 1px solid var(--bm-line); background: #fff; color: #3A3530; font-size: 14px; font-weight: 700; }
html.bm-lock, html.bm-lock body { overflow: hidden; }

/* phones */
@media (max-width: 680px) {
	.bm-sections { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 12px; }
	.bm-sections::-webkit-scrollbar { display: none; }
	.bm .bm-chip { flex: none; }
	.bm-stage { padding: 10px 0 66px; border-radius: 14px; }
	/* arrows move under the page so they never cover a product */
	.bm .bm-nav { top: auto; bottom: 10px; transform: none; width: 46px; height: 46px; }
	.bm .bm-nav--back { right: calc(50% + 8px); }
	.bm .bm-nav--fwd { left: calc(50% + 8px); }
	.bm-progress { width: 120px; }
	.bm .bm-products__title { font-size: 20px; }
}

/* fullscreen */
.bm:fullscreen { max-width: none; overflow: auto; padding: 16px 24px; background: #111; color: #fff; }
.bm:fullscreen .bm-stage { background: transparent; }
.bm:fullscreen .bm-note, .bm:fullscreen .bm-hint, .bm:fullscreen .bm-products, .bm:fullscreen .bm-sections__label { display: none; }
.bm:fullscreen .bm-pos span { color: #B9B2A9; }

/* no flip library: show pages in a list */
.bm--noflip .bm-book { display: grid; gap: 16px; max-width: 640px; }
.bm--noflip .bm-page { position: relative; }
.bm--noflip .bm-nav, .bm--noflip .bm-bar { display: none; }
.bm .bm-hs--unlinked.bm-hs--compact .bm-pill { width: auto; padding: 0 8px; }

/* themes underline links: never on our buttons */
.bm a, .bm a:hover, .bm a:focus, .bm a *, .bm button { text-decoration: none !important; }
.bm .bm-pill, .bm .bm-pill:visited { color: var(--bm-ink); }
.bm .bm-pill:hover, .bm .bm-pill:focus-visible { color: #fff; }
@media (max-width: 680px) {
	.bm-hint { padding: 10px 14px; }
	.bm-hint__text { font-size: 13px; }
	.bm-hint__sample { height: 30px; font-size: 12px; }
	.bm-hint__sample .bm-pill__ic { width: 22px; height: 22px; }
}

/* agreed placement: the pill straddles the card's bottom edge at the bottom-right corner */
.bm .bm-hs--edge .bm-pill,
.bm .bm-hs--edge .bm-pill.is-lifted { transform: translate(calc(-100% + 6px), -50%); }
.bm .bm-hs--edge.bm-hs--eb .bm-pill { transform: translate(-100%, -50%); }
.bm .bm-hs--edge .bm-dot { transform: translate(calc(-100% + 4px), -50%); }
.bm .bm-hs--edge.bm-hs--eb .bm-dot { transform: translate(-100%, -50%); }
.bm .bm-hs--edge .bm-tip { bottom: calc(100% + 8px); top: auto; }
