/* ============================================================================
   ALPHA PEPTIDES — THE SHARED PRODUCT CARD (+ dose sheet)
   Source rules for .ap-pcard, promoted from `body.ap-home` to `body.ap-stg`
   (identical specificity) so every grid, carousel and search result uses one
   component. Home-specific overrides still win: ap-home.css loads after this.
   ========================================================================= */

/* ---- grid ---------------------------------------------------------------- */
body.ap-stg .ap-pcards {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: clamp(16px, 1.6vw, 22px);
	margin-top: 28px;
}
@media (max-width: 980px) { body.ap-stg .ap-pcards { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 720px) { body.ap-stg .ap-pcards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 460px) { body.ap-stg .ap-pcards { grid-template-columns: 1fr; } }
/* 2-col on mobile, overriding the 1-col at 460px. */
@media (max-width: 768px) {
	body.ap-stg .ap-pcards { grid-template-columns: repeat(2, 1fr) !important; gap: 12px !important; }
	body.ap-stg .ap-pcard__name { font-size: 14px !important; }
	body.ap-stg .ap-pcard__body { padding: 12px !important; }
}

/* ---- card ---------------------------------------------------------------- */
body.ap-stg .ap-pcard {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 10px;
	background: transparent;
	border: 0;
	overflow: visible;
}
body.ap-stg .ap-pcard__inner {
	position: relative;
	display: flex;
	flex-direction: column;
	background: var(--ap-bg);
	border: 1px solid var(--ap-line);
	border-radius: var(--ap-radius);
	overflow: hidden;
	transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
body.ap-stg .ap-pcard:hover .ap-pcard__inner {
	transform: translateY(-2px);
	border-color: var(--ap-line-2);
	box-shadow: 0 14px 28px rgba(7,15,30,0.08);
}

/* SALE pill — top-left. 6px radius (audit 2026-08-06 E3: matched to the
   archive .onsale badge). */
body.ap-stg .ap-pcard__badge {
	position: absolute;
	top: 10px;
	left: 10px;
	z-index: 2;
	padding: 4px 10px;
	background: var(--ap-blue);
	color: #fff;
	font-size: 10.5px;
	font-weight: 800;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	border-radius: 6px;
}

/* Image area — pre-squared 1:1 vial photos, filling the wrap edge-to-edge. */
body.ap-stg .ap-pcard__imgwrap {
	display: block;
	aspect-ratio: 1 / 1;
	background-color: #F4EADC;
	overflow: hidden;
}
body.ap-stg .ap-pcard__img {
	width: 100%;
	height: 100%;
	max-width: none;
	max-height: none;
	object-fit: contain;
	object-position: center center;
	display: block;
	transform: scale(1.18);
	transform-origin: center center;
	transition: transform .25s ease;
}
/* The source declares three successive :hover transforms; the last wins. */
body.ap-stg .ap-pcard:hover .ap-pcard__img { transform: scale(1.03); }

/* Body — centered name, no price (the source's featured card has none). */
body.ap-stg .ap-pcard__body {
	padding: 14px 16px 14px;
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	gap: 4px;
}
body.ap-stg .ap-pcard__name {
	font-size: 21px;
	font-weight: 800;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	color: var(--ap-ink) !important;
	text-decoration: none !important;
	line-height: 1.2;
}
body.ap-stg .ap-pcard__name:hover { color: var(--ap-blue) !important; }
body.ap-stg .ap-pcard__dose {
	font-size: 14.5px;
	font-weight: 600;
	color: var(--ap-ink-3);
	letter-spacing: 0.06em;
	text-transform: uppercase;
}
body.ap-stg .ap-pcard__price { font-size: 19px; font-weight: 800; color: var(--ap-ink); margin-top: 6px; }
body.ap-stg .ap-pcard__price-old {
	display: inline-block;
	font-size: 14.5px;
	font-weight: 600;
	color: var(--ap-ink-3);
	text-decoration: line-through;
	margin-right: 6px;
}

/* CTA — standalone solid button BELOW the card. */
body.ap-stg .ap-pcard__form { margin: 0; }
body.ap-stg .ap-pcard__cta {
	display: block;
	width: 100%;
	appearance: none;
	-webkit-appearance: none;
	background: var(--ap-blue);
	border: 0;
	border-radius: var(--ap-radius);
	padding: 13px 14px;
	font-family: inherit;
	font-size: 13px;
	font-weight: 800;
	letter-spacing: 0.10em;
	text-transform: uppercase;
	color: #fff !important;
	cursor: pointer;
	text-align: center;
	text-decoration: none;
	box-shadow: 0 4px 12px rgba(37,99,235,0.22);
	transition: background .15s ease, transform .15s ease, box-shadow .15s ease;
}
body.ap-stg .ap-pcard__cta:hover {
	background: var(--ap-blue-2);
	transform: translateY(-1px);
	box-shadow: 0 8px 20px rgba(37,99,235,0.30);
}
body.ap-stg .ap-pcard__cta.is-loading { opacity: .72; pointer-events: none; }

/* Centered "Shop All Peptides" CTA below the grid. */
body.ap-stg .ap-pcards__cta { display: flex; justify-content: center; margin-top: clamp(28px, 3vw, 44px); }
body.ap-stg .ap-pcards__shopall { font-size: 14.5px; padding: 16px 36px; letter-spacing: 0.04em; }

/* ============================================================================
   DOSE SHEET — in-place variant picker (STANDARDS #13.4).
   Self-contained CSS on purpose: overlays must never depend on utility
   classes that a purged bundle might not contain.
   ========================================================================= */
body.ap-stg .ap-dose-sheet {
	position: fixed;
	inset: 0;
	z-index: 10030;
	display: flex;
	align-items: flex-end;
	justify-content: center;
	opacity: 0;
	pointer-events: none;
	transition: opacity .22s ease;
}
body.ap-stg .ap-dose-sheet[hidden] { display: none; }
body.ap-stg .ap-dose-sheet.is-open { opacity: 1; pointer-events: auto; }
body.ap-stg .ap-dose-sheet__overlay {
	position: absolute;
	inset: 0;
	background: rgba(7,15,30,0.54);
}
body.ap-stg .ap-dose-sheet__panel {
	position: relative;
	z-index: 1;
	width: min(460px, calc(100% - 24px));
	margin-bottom: 24px;
	background: #fff;
	border: 1px solid var(--ap-line);
	border-radius: 16px;
	box-shadow: 0 30px 60px rgba(7,15,30,0.28);
	padding: 20px 20px 16px;
	transform: translateY(14px);
	transition: transform .24s cubic-bezier(.2,.7,.2,1);
	max-height: 80vh;
	overflow: auto;
}
body.ap-stg .ap-dose-sheet.is-open .ap-dose-sheet__panel { transform: translateY(0); }
@media (min-width: 721px) {
	body.ap-stg .ap-dose-sheet { align-items: center; }
	body.ap-stg .ap-dose-sheet__panel { margin-bottom: 0; }
}
body.ap-stg .ap-dose-sheet__head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 14px;
	margin-bottom: 4px;
}
body.ap-stg .ap-dose-sheet__title {
	margin: 0;
	font-family: var(--ap-font);
	font-size: 20px;
	font-weight: 800;
	letter-spacing: -0.01em;
	line-height: 1.15;
	color: var(--ap-ink);
}
body.ap-stg .ap-dose-sheet__close {
	flex: none;
	width: 32px;
	height: 32px;
	border: 1px solid var(--ap-line);
	border-radius: 50%;
	background: var(--ap-cream);
	color: var(--ap-ink);
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
}
body.ap-stg .ap-dose-sheet__hint {
	margin: 0 0 14px;
	font-size: 12.5px;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--ap-ink-3);
}
body.ap-stg .ap-dose-sheet__list {
	list-style: none;
	margin: 0 0 14px;
	padding: 0;
	display: grid;
	gap: 8px;
}
body.ap-stg .ap-dose-sheet__opt {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	width: 100%;
	padding: 13px 16px;
	background: #fff;
	border: 1.5px solid var(--ap-line);
	border-radius: 12px;
	font-family: var(--ap-font);
	font-size: 15px;
	font-weight: 700;
	color: var(--ap-ink);
	cursor: pointer;
	text-align: left;
	transition: border-color .15s ease, background .15s ease;
}
body.ap-stg .ap-dose-sheet__opt:hover { border-color: var(--ap-blue); background: #F7FAFF; }
body.ap-stg .ap-dose-sheet__opt[aria-pressed="true"] { border-color: var(--ap-blue); background: #F2F7FF; }
body.ap-stg .ap-dose-sheet__opt[disabled] { opacity: .45; cursor: not-allowed; }
body.ap-stg .ap-dose-sheet__opt span { color: var(--ap-ink-3); font-weight: 700; }
body.ap-stg .ap-dose-sheet__add {
	display: block;
	width: 100%;
	border: 0;
	border-radius: var(--ap-radius);
	padding: 14px;
	background: var(--ap-blue);
	color: #fff;
	font-family: var(--ap-font);
	font-size: 13px;
	font-weight: 800;
	letter-spacing: 0.10em;
	text-transform: uppercase;
	cursor: pointer;
	box-shadow: 0 4px 12px rgba(37,99,235,0.22);
}
body.ap-stg .ap-dose-sheet__add[disabled] { opacity: .5; cursor: not-allowed; box-shadow: none; }
body.ap-stg .ap-dose-sheet__more {
	display: block;
	margin-top: 10px;
	text-align: center;
	font-size: 13px;
	font-weight: 700;
	color: var(--ap-ink-3);
	text-decoration: none;
}
body.ap-stg .ap-dose-sheet__more:hover { color: var(--ap-blue); }
