/* ============================================================================
   ALPHA PEPTIDES — SITE CHROME
   Promo bar · floating-pill fixed header · header icons · cart badge ·
   mobile nav · search overlay · header spacer · site footer.
   (The cart DRAWER is the checkout plugin's — see the note below.)

   Verbatim from the source's apex-sitewide-css / apx-audit-fixes-2026-08-06 /
   ap-slim-mobile-header-css, minus the rules that only existed to neutralise
   Blocksy wrappers we do not ship.
   ========================================================================= */

/* ===== PROMO BAR ===== */
body.ap-stg .ap-promo {
	position: fixed;
	top: 0; left: 0; right: 0;
	z-index: 101;
	background: var(--ap-dark);
	color: var(--ap-dark-ink);
	font-size: 12.5px;
	font-weight: 500;
	letter-spacing: 0.01em;
	border-bottom: 1px solid rgba(255,255,255,0.06);
}
body.ap-stg .ap-promo__inner {
	max-width: var(--ap-max);
	margin: 0 auto;
	padding: 9px 16px;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	flex-wrap: wrap;
}
body.ap-stg .ap-promo b {
	color: #8AF2B0;
	font-weight: 800;
	letter-spacing: 0.06em;
	padding: 0 4px;
}
body.ap-stg .ap-promo__dot {
	width: 6px; height: 6px;
	border-radius: 50%;
	background: #6FE599;
	box-shadow: 0 0 0 4px rgba(31,171,87,0.22);
	animation: apPulse 2.2s ease-in-out infinite;
	flex: none;
}
body.ap-stg.admin-bar .ap-promo { top: 32px; }
@media (max-width: 600px) {
	body.ap-stg .ap-promo { font-size: 11px; }
	body.ap-stg .ap-promo__inner { padding: 7px 12px; }
}

/* ===== FIXED HEADER ===== */
body.ap-stg .ap-hdr {
	position: fixed;
	top: var(--ap-promo-h); left: 0; right: 0;
	z-index: 9000;
	background: rgba(255,255,255,0.92);
	backdrop-filter: saturate(140%) blur(10px);
	-webkit-backdrop-filter: saturate(140%) blur(10px);
	border-bottom: 1px solid var(--ap-line);
	border-radius: 0;
	margin: 0;
	width: 100%;
	max-width: 100%;
	box-shadow: none;
}
/* The source's header is OPAQUE, not the translucent 0.92 above: a
   `.floating-pill-header { background:#ffffff !important }` rule lives in an
   inline sheet that was never saved into source-cdp/inline/, which is why the
   rendered header computes rgb(255,255,255) while the captured CSS says
   rgba(...,0.92). We emit the class, so we must ship its rule too.
   Unscoped on purpose — it must hold on every page, not just a staging body. */
.floating-pill-header {
	background: #ffffff !important;
	background-image: none !important;
}

body.ap-stg.admin-bar .ap-hdr { top: calc(var(--ap-promo-h) + 32px); }
@media (max-width: 600px) {
	body.ap-stg.admin-bar .ap-hdr { top: calc(var(--ap-promo-h) + 46px); }
}
body.ap-stg .ap-hdr__inner {
	max-width: var(--ap-max);
	margin: 0 auto;
	padding: 0 var(--ap-gut);
	display: flex;
	align-items: center;
	gap: 32px;
	height: var(--ap-hdr-h);
	border-radius: 0;
	box-shadow: none;
}
body.ap-stg .ap-hdr__logo { display: inline-flex; align-items: center; }
body.ap-stg .ap-hdr__logo img { height: 56px; width: auto; display: block; }

body.ap-stg .ap-hdr__nav {
	display: flex;
	gap: 22px;
	margin-left: auto;
}
body.ap-stg .ap-hdr__nav a {
	color: var(--ap-ink);
	text-decoration: none;
	font-size: 17px;
	font-weight: 700;
	letter-spacing: 0.005em;
	padding: 8px 0;
	position: relative;
	transition: color .15s ease;
}
body.ap-stg .ap-hdr__nav a::after {
	content: "";
	position: absolute; left: 0; right: 0; bottom: 2px;
	height: 1px;
	background: var(--ap-ink);
	transform: scaleX(0);
	transform-origin: right;
	transition: transform .25s ease;
}
body.ap-stg .ap-hdr__nav a:hover { color: var(--ap-ink); }
body.ap-stg .ap-hdr__nav a:hover::after { transform: scaleX(1); transform-origin: left; }
body.ap-stg .ap-hdr__nav a[aria-current="page"]::after { transform: scaleX(1); }

/* The source declares __util twice; the later 4px gap wins. */
body.ap-stg .ap-hdr__util { display: inline-flex; align-items: center; gap: 4px; }

/* ===== HEADER ICON BUTTONS (cart / search / account) ===== */
body.ap-stg .ap-hdr__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px; height: 40px;
	background: transparent;
	border: none;
	border-radius: 999px;
	color: var(--ap-ink);
	cursor: pointer;
	position: relative;
	transition: background .15s ease, transform .15s ease;
	text-decoration: none;
	padding: 0;
}
body.ap-stg .ap-hdr__icon:hover { background: var(--ap-cream); }
body.ap-stg .ap-hdr__icon svg { display: block; width: 22px; height: 22px; }
/* ===== CART COUNTER — a plain round dot, no number (user directive) =====
   The source paints a numbered blue pill (min-width 18 / height 18 /
   padding 0 5px / 10.5px-800 / line-height 18 / #2563EB / radius 999 /
   ring 0 0 0 2px #fff) at top:2 right:2. We keep the colour, the radius, the
   ring and the offsets, and collapse it to a fixed ~10px circle.

   ⚠ Unscoped on purpose. The source's own rule is scoped to `body.ap-stg`,
   a STAGING body class; copied verbatim the badge would be unstyled on any
   page that does not carry it.

   `font-size:0` + `color:transparent` are a guard, not decoration: the
   checkout plugin's paintCount() writes `badge.textContent = String(n)`, so
   a digit can still be injected at runtime. It must never become visible.
   `pointer-events:none` keeps the dot from eating the cart link's click. */
.ap-hdr__cart-badge {
	position: absolute;
	top: 2px;
	right: 2px;
	width: 10px;
	height: 10px;
	min-width: 0;
	padding: 0;
	border-radius: 999px;
	background: #2563EB;
	box-shadow: 0 0 0 2px #fff;
	font-size: 0;
	line-height: 0;
	color: transparent;
	text-indent: -9999px;
	overflow: hidden;
	pointer-events: none;
}

/* ===== HEADER SPACER =====
   Header top = --ap-promo-h; header bottom = promo-h + hdr-h; spacer adds 2px. */
body.ap-stg .ap-hdr-spacer { height: calc(var(--ap-promo-h) + var(--ap-hdr-h) + 2px); }

/* ===== SEARCH OVERLAY ===== */
body.ap-stg .ap-search-overlay {
	position: fixed; inset: 0;
	background: rgba(7,15,30,0.55);
	z-index: 9999;
	opacity: 0;
	pointer-events: none;
	transition: opacity .24s ease;
	display: flex;
	align-items: flex-start;
	justify-content: center;
	padding-top: 18vh;
}
body.ap-stg .ap-search-overlay[hidden] { display: none !important; }
body.ap-stg .ap-search-overlay.is-open { opacity: 1; pointer-events: auto; }
body.ap-stg .ap-search-overlay__form {
	width: min(680px, calc(100% - 32px));
	background: #fff;
	border-radius: 14px;
	display: flex;
	align-items: center;
	padding: 6px 6px 6px 22px;
	box-shadow: 0 30px 60px rgba(0,0,0,0.30);
	transform: translateY(-12px);
	transition: transform .25s cubic-bezier(.2,.7,.2,1);
}
body.ap-stg .ap-search-overlay.is-open .ap-search-overlay__form { transform: translateY(0); }
body.ap-stg .ap-search-overlay__input {
	flex: 1;
	border: none;
	background: transparent;
	font-family: var(--ap-font);
	font-size: 17px;
	color: var(--ap-ink);
	padding: 16px 12px;
	outline: none;
}
body.ap-stg .ap-search-overlay__input::placeholder { color: var(--ap-ink-3); }
body.ap-stg .ap-search-overlay__close {
	background: var(--ap-cream);
	border: 1px solid var(--ap-line);
	border-radius: 50%;
	width: 40px; height: 40px;
	font-size: 26px;
	line-height: 1;
	color: var(--ap-ink);
	cursor: pointer;
}

/* ===== MOBILE HEADER + HAMBURGER =====
   880px, not 768px: 769-880 covers iPad Air (820) / iPad Pro 11" (834) portrait,
   which otherwise had no navigation at all. */
@media (max-width: 880px) {
	body.ap-stg .ap-hdr__nav { display: none; }
	body.ap-stg .ap-hdr__inner { gap: 12px; padding: 0 16px; }
	body.ap-stg .ap-hdr__logo img { height: 30px; }
	body.ap-stg .ap-hdr__util { margin-left: auto; }
}
body.ap-stg .ap-hdr__hamburger { display: none; }
@media (max-width: 880px) {
	body.ap-stg .ap-hdr__hamburger {
		display: inline-flex;
		flex-direction: column;
		justify-content: center;
		align-items: center;
		gap: 4px;
		width: 40px; height: 40px;
		background: transparent;
		border: none;
		cursor: pointer;
		padding: 0;
		margin-right: 4px;
	}
	body.ap-stg .ap-hdr__hamburger span {
		display: block;
		width: 22px; height: 2px;
		background: var(--ap-ink);
		border-radius: 2px;
		transition: transform .25s ease, opacity .2s ease;
	}
	body.ap-stg .ap-hdr__hamburger.is-open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
	body.ap-stg .ap-hdr__hamburger.is-open span:nth-child(2) { opacity: 0; }
	body.ap-stg .ap-hdr__hamburger.is-open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
}
@media (max-width: 768px) {
	body.ap-stg .ap-hdr__inner { height: 64px; }
	body.ap-stg .ap-hdr__logo img { height: 28px; }
	body.ap-stg .ap-main { max-width: 100%; overflow-x: clip; }
}

/* ===== MOBILE OVERLAY MENU ===== */
body.ap-stg .ap-mobile-nav {
	position: fixed; inset: 0;
	background: rgba(7,15,30,0.55);
	z-index: 9998;
	opacity: 0;
	pointer-events: none;
	transition: opacity .25s ease;
	display: block;
}
body.ap-stg .ap-mobile-nav[hidden] { display: none !important; }
body.ap-stg .ap-mobile-nav.is-open { opacity: 1; pointer-events: auto; }
body.ap-stg .ap-mobile-nav__panel {
	position: absolute;
	top: 0; right: 0; bottom: 0;
	width: min(82%, 340px);
	background: #fff;
	padding: 28px 24px;
	box-shadow: -8px 0 24px rgba(0,0,0,0.15);
	transform: translateX(100%);
	transition: transform .28s cubic-bezier(.2,.7,.2,1);
	display: flex;
	flex-direction: column;
}
body.ap-stg .ap-mobile-nav.is-open .ap-mobile-nav__panel { transform: translateX(0); }
body.ap-stg .ap-mobile-nav__close {
	background: transparent;
	border: 1px solid var(--ap-line);
	border-radius: 50%;
	width: 36px; height: 36px;
	font-size: 24px; line-height: 1;
	color: var(--ap-ink);
	cursor: pointer;
	align-self: flex-end;
	margin-bottom: 24px;
}
body.ap-stg .ap-mobile-nav__list { display: flex; flex-direction: column; gap: 4px; }
body.ap-stg .ap-mobile-nav__list a {
	display: block;
	font-family: var(--ap-font);
	font-size: 22px;
	font-weight: 800;
	letter-spacing: -0.01em;
	color: var(--ap-ink);
	text-decoration: none;
	padding: 14px 8px;
	border-bottom: 1px solid var(--ap-line);
}
body.ap-stg .ap-mobile-nav__list a:hover { color: #16933F; }
body.ap-stg .ap-mobile-nav__list a:last-child { border-bottom: none; }
@media (min-width: 881px) {
	body.ap-stg .ap-mobile-nav { display: none !important; }
}

/* ===== CART DRAWER =====
   ⛔ NOT OURS. The slide-out cart drawer is owned end-to-end by the
   `alphapeptides-checkout` plugin (markup `apck_drawer_markup()`, styles
   `apck-drawer.css`, behaviour `alphapeptides-checkout.js`), because the
   drawer renders the free-ship progress, the coupon field and the
   quantity-ladder totals — the plugin's own economics. The theme shipped a
   second copy; it has been removed so the two cannot drift.

   The theme must NOT define AP_THEME_OWNS_CART_DRAWER: that constant
   suppresses the plugin's own wp_footer injection.

   The header cart link `a.ap-hdr__cart` is still ours — the plugin
   preventDefault()s it and opens its drawer. We bind nothing to it. */

/* ===== SITE FOOTER (footer.ap-site-footer — the real one) ===== */
body.ap-stg .ap-site-footer {
	margin-top: 0;
	position: relative;
	isolation: isolate;
	overflow: hidden;
	background:
		radial-gradient(circle at 12% 0%, rgba(37,99,235,0.055), transparent 34%),
		radial-gradient(circle at 88% 0%, rgba(31,171,87,0.04), transparent 30%),
		linear-gradient(180deg, #FFFFFF 0%, #F8FBFF 100%);
	color: var(--ap-ink);
	border-top: 1px solid #E3EAF5;
}
body.ap-stg .ap-site-footer::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background:
		linear-gradient(90deg, rgba(37,99,235,0.032) 1px, transparent 1px),
		linear-gradient(180deg, rgba(37,99,235,0.022) 1px, transparent 1px);
	background-size: 64px 64px;
	mask-image: linear-gradient(180deg, rgba(0,0,0,0.16), transparent 68%);
	-webkit-mask-image: linear-gradient(180deg, rgba(0,0,0,0.16), transparent 68%);
	opacity: 0.28;
}
body.ap-stg .ap-site-footer__inner {
	max-width: var(--ap-max);
	margin: 0 auto;
	padding: clamp(28px, 3.4vw, 40px) var(--ap-gut) 0;
}
body.ap-stg .ap-site-footer__top {
	display: grid;
	grid-template-columns: minmax(180px, 0.72fr) minmax(520px, 1.65fr) minmax(300px, 0.95fr);
	gap: clamp(24px, 3vw, 42px);
	align-items: start;
}
body.ap-stg .ap-site-footer__brand { max-width: 260px; }
body.ap-stg .ap-site-footer__logo {
	display: inline-flex;
	align-items: center;
	padding: 0;
	background: transparent;
	border: 0;
	border-radius: 0;
	box-shadow: none;
}
body.ap-stg .ap-site-footer__logo img { display: block; width: min(220px, 52vw); height: auto; }
body.ap-stg .ap-site-footer__summary { max-width: 390px; justify-self: end; }
body.ap-stg .ap-site-footer__summary p {
	margin: 0;
	color: #43506A;
	font-size: clamp(12.75px, 0.86vw, 13.75px);
	line-height: 1.45;
}
body.ap-stg .ap-site-footer__summary strong { color: var(--ap-ink); font-weight: 800; }
body.ap-stg .ap-site-footer__nav {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 24px;
}
body.ap-stg .ap-site-footer__col {
	padding: 0;
	border-radius: 0;
	background: transparent;
	border: 0;
	box-shadow: none;
}
body.ap-stg .ap-site-footer__col h2 {
	margin: 0 0 12px;
	color: var(--ap-ink);
	font-family: var(--ap-font);
	font-size: 12.5px;
	font-weight: 900;
	letter-spacing: 0;
	text-transform: uppercase;
}
body.ap-stg .ap-site-footer__col ul {
	list-style: none;
	padding: 0;
	margin: 0;
	display: grid;
	gap: 9px;
}
body.ap-stg .ap-site-footer__col a,
body.ap-stg .ap-site-footer__contact-card a {
	color: #2E3A52;
	text-decoration: none;
	font-size: 14.5px;
	font-weight: 650;
}
body.ap-stg .ap-site-footer__col a:hover,
body.ap-stg .ap-site-footer__contact-card a:hover {
	color: var(--ap-blue);
	text-decoration: underline;
	text-underline-offset: 4px;
}
body.ap-stg .ap-site-footer__contact {
	margin-top: clamp(14px, 1.8vw, 18px);
	padding-top: 10px;
	border-top: 1px solid #E1E9F5;
	display: grid;
	grid-template-columns: 1.4fr 1fr 1.1fr;
	gap: 8px;
}
body.ap-stg .ap-site-footer__contact-card {
	min-height: 0;
	padding: 7px 11px;
	border-radius: 6px;
	background: rgba(255,255,255,0.42);
	border: 1px solid #E0E8F4;
	box-shadow: none;
	display: flex;
	align-items: center;
	gap: 10px;
}
body.ap-stg .ap-site-footer__contact-label {
	display: block;
	margin: 0;
	color: #7DA7FF;
	font-size: 10px;
	font-weight: 900;
	letter-spacing: 0;
	text-transform: uppercase;
	white-space: nowrap;
}
body.ap-stg .ap-site-footer__contact-card p {
	margin: 0;
	color: #243047;
	font-size: 12.75px;
	font-weight: 650;
	line-height: 1.22;
	min-width: 0;
}
body.ap-stg .ap-site-footer__bottom {
	margin-top: 16px;
	padding: 11px var(--ap-gut);
	background: rgba(255,255,255,0.68);
	box-shadow: 0 0 0 100vmax rgba(255,255,255,0.68);
	clip-path: inset(0 -100vmax);
	border-top: 1px solid #E1E9F5;
	display: flex;
	justify-content: center;
	color: #66738A;
	font-size: 12.5px;
	font-weight: 750;
	text-align: center;
}
@media (max-width: 1080px) {
	body.ap-stg .ap-site-footer__top { grid-template-columns: 1fr; }
	body.ap-stg .ap-site-footer__brand { max-width: 760px; }
	body.ap-stg .ap-site-footer__summary { max-width: 760px; justify-self: start; }
}
@media (max-width: 820px) {
	body.ap-stg .ap-site-footer__inner { padding-top: 28px; }
	body.ap-stg .ap-site-footer__nav,
	body.ap-stg .ap-site-footer__contact { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 16px; }
	body.ap-stg .ap-site-footer__col,
	body.ap-stg .ap-site-footer__contact-card { padding: 0; }
	body.ap-stg .ap-site-footer__contact-card { padding: 10px 12px; display: block; }
	body.ap-stg .ap-site-footer__contact-card:first-child,
	body.ap-stg .ap-site-footer__contact-card:last-child { grid-column: 1 / -1; }
	body.ap-stg .ap-site-footer__logo { padding: 0; }
	body.ap-stg .ap-site-footer__logo img { width: min(178px, 54vw); }
	body.ap-stg .ap-site-footer__summary p { font-size: 14px; line-height: 1.48; }

	/* audit 2026-08-06 (H10/E1): TEXT NUMBER was orphaned in a 167px track and
	   SERVICES was orphaned out of the 2-col nav. */
	body.ap-stg .ap-site-footer .ap-site-footer__contact { grid-template-columns: 1fr; }
	body.ap-stg .ap-site-footer .ap-site-footer__nav { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
}
/* audit E1 (the later pass, appended at the end of apx-audit-fixes): on phones
   the ≤820 auto-fit resolves to TWO 167px tracks and strands Services in row 2.
   The three labels are short, so three ~113px tracks fit the 350px column.
   Verified against _shots/home-390.png, where the source renders 3 columns. */
@media (max-width: 560px) {
	body.ap-stg .ap-site-footer__nav {
		grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
		gap: 10px !important;
	}
}

/* ===== LATE OVERRIDES (source loads these BEFORE apex-sitewide-css but with a
   higher `html body` specificity, so they win regardless of order) ===== */
@media (max-width: 768px) {
	html body.ap-stg .ap-promo__inner { padding: 4px 12px !important; }
	html body.ap-stg .ap-promo { font-size: 10.5px !important; transition: transform .22s ease !important; }
	html body.ap-stg .ap-hdr { --ap-hdr-h: 54px !important; padding-top: 0 !important; padding-bottom: 0 !important; transition: top .22s ease !important; }
	html body.ap-stg .ap-hdr__inner { height: 54px !important; }
	html body.ap-stg .ap-hdr__logo img { height: 30px !important; }
	:root { --ap-fixed-header-offset: calc(var(--ap-promo-h) + 58px) !important; }
	html.ap-promo-away body.ap-stg:not(.admin-bar) .ap-promo { transform: translateY(-100%) !important; }
	html.ap-promo-away body.ap-stg:not(.admin-bar) .ap-hdr { top: 0 !important; }
}
