/* ==========================================================================
   Biohack Therapeutics — shared base stylesheet.
   Design tokens, resets, section utilities, buttons, header, the
   product-card system, and footer — the pieces reused verbatim across the
   front page, shop/category archives, and single product page. Ported
   from /storefront/styles.css. Page-specific sections (hero, marquee,
   category-icon tiles, trust bar) live in homepage.css; shop/product-only
   sections live in shop.css.
   ========================================================================== */

:root {
	--bg: #F5F9FA;                  /* dominant background — near-white, cyan-tinted, sampled from mockup */
	--bg-card: #FFFFFF;
	--bg-alt: #EFF6F7;
	--text: #27323C;                 /* dark charcoal — sampled from mockup headline/badge pixels */
	--text-muted: rgba(39, 50, 60, 0.62);
	--text-faint: rgba(39, 50, 60, 0.42);

	--teal: #3ED2C4;                 /* primary accent — sampled from mockup button/eyebrow/badge pixels */
	--teal-deep: #2FB0A4;            /* hover state */
	--teal-tint: #E3F7F5;            /* light hover backgrounds */

	--copper: #D6A45E;               /* small logo-mark accent only, sampled from mockup */

	--paper: #FFFFFF;
	--border: #E1EEF0;

	--radius-card: 16px;
	--radius-pill: 999px;
	--shadow-card: 0 8px 24px -10px rgba(39, 50, 60, 0.10);
	--shadow-card-hover: 0 20px 36px -12px rgba(39, 50, 60, 0.16);
	--shadow-soft: 0 5px 30px 0 rgba(39, 50, 60, 0.07);
	--shadow-scroll: 0 4px 10px rgba(39, 50, 60, 0.08);

	--container: 1200px;
	--ease-brand: cubic-bezier(.3, 1, .3, 1);

	--font: 'Instrument Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	--font-display: 'Belleza', sans-serif;
}

* {
	box-sizing: border-box;
}

html {
	scroll-behavior: smooth;
}

body {
	margin: 0;
	font-family: var(--font);
	font-size: 16px;
	color: var(--text);
	background-color: var(--bg);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4 {
	font-family: var(--font);
	font-weight: 700;
	margin: 0;
	color: var(--text);
}

h1 { font-size: clamp(2.25rem, 4vw, 2.6rem); line-height: 1.18; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.75rem, 3vw, 2.1rem); line-height: 1.25; letter-spacing: -0.015em; }
h3 { font-size: 1.15rem; line-height: 1.3; }
h4 { font-size: 1rem; line-height: 1.3; }

p {
	margin: 0;
}

a {
	color: inherit;
	text-decoration: none;
}

ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

svg {
	display: block;
}

.section-inner {
	max-width: var(--container);
	margin: 0 auto;
	padding: 0 24px;
}

.section-kicker {
	display: block;
	text-align: center;
	font-size: 0.85rem;
	font-weight: 600;
	color: var(--teal-deep);
	margin-bottom: 10px;
}

.section-kicker--left {
	text-align: left;
}

.section-title {
	text-align: center;
	margin-bottom: 40px;
}

.section-subtitle {
	text-align: center;
	color: var(--text-muted);
	font-size: 1rem;
	margin-top: -24px;
	margin-bottom: 40px;
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-weight: 600;
	font-size: 15px;
	border: 1.5px solid transparent;
	cursor: pointer;
	white-space: nowrap;
	transition: background-color 0.3s var(--ease-brand), color 0.3s var(--ease-brand),
		border-color 0.3s var(--ease-brand), transform 0.25s var(--ease-brand), box-shadow 0.25s var(--ease-brand);
}

.btn--pill {
	height: 48px;
	padding: 0 30px;
	border-radius: var(--radius-pill);
}

.btn--bronze {
	background-color: var(--teal);
	color: #ffffff;
	box-shadow: 0 10px 22px -10px rgba(46, 176, 164, 0.55);
}

.btn--bronze:hover {
	background-color: var(--teal-deep);
	transform: translateY(-2px);
}

.btn--slate {
	background-color: transparent;
	color: var(--text);
	border-color: var(--text);
}

.btn--slate:hover {
	background-color: var(--text);
	border-color: var(--text);
	color: #ffffff;
	transform: translateY(-2px);
}

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
	position: sticky;
	top: 0;
	z-index: 1000;
	background-color: var(--paper);
	border-bottom: 1px solid var(--border);
	transition: box-shadow 0.3s ease;
}

.site-header.is-scrolled {
	box-shadow: var(--shadow-scroll);
}

.site-header__inner {
	max-width: var(--container);
	margin: 0 auto;
	padding: 0 24px;
	height: 76px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
}

.site-header__logo {
	display: flex;
	flex-direction: column;
	font-weight: 800;
	font-size: 1.05rem;
	letter-spacing: 0.06em;
	flex-shrink: 0;
	line-height: 1.3;
}

/* Real flag photo (pre-cropped tight to the flag itself — see
   flag-gold-cropped.png). Small fixed width, NOT stretched to the
   wordmark — align-self overrides the column flex container's default
   stretch, which is what blew this up to full-width before. */
.site-header__mark {
	display: block;
	align-self: flex-start;
	width: 40px;
	height: auto;
	margin-bottom: 6px;
}

.site-header__logo-sub {
	display: block;
	font-size: 0.55rem;
	font-weight: 600;
	letter-spacing: 0.2em;
	color: var(--text-muted);
}

.site-header__nav {
	flex: 1;
	display: flex;
	justify-content: center;
}

.site-header__nav > ul {
	display: flex;
	align-items: center;
	gap: 0;
}

.site-header__nav > ul > li {
	position: relative;
}

.site-header__nav > ul > li > a {
	display: flex;
	align-items: center;
	gap: 3px;
	padding: 10px 9px;
	font-weight: 500;
	font-size: 0.8rem;
	letter-spacing: -0.01em;
	white-space: nowrap;
	border-radius: 6px;
	transition: color 0.3s ease;
}

.site-header__nav > ul > li > a:hover,
.site-header__nav > ul > li > a.is-active {
	color: var(--teal-deep);
}

.chevron {
	width: 10px;
	height: 10px;
	transition: transform 0.3s var(--ease-brand);
}

.has-dropdown:hover .chevron {
	transform: rotate(180deg);
}

.dropdown {
	position: absolute;
	top: calc(100% + 8px);
	left: 50%;
	transform: translateX(-50%) translateY(4px);
	background-color: var(--paper);
	border-radius: var(--radius-card);
	box-shadow: var(--shadow-soft);
	padding: 10px;
	min-width: 220px;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s var(--ease-brand), transform 0.3s var(--ease-brand), visibility 0.3s;
}

.has-dropdown:hover .dropdown {
	opacity: 1;
	visibility: visible;
	transform: translateX(-50%) translateY(0);
}

.dropdown li a {
	display: block;
	padding: 9px 14px;
	border-radius: 6px;
	font-size: 0.88rem;
	font-weight: 500;
	transition: color 0.3s ease, background-color 0.3s ease;
}

.dropdown li a:hover {
	background-color: var(--teal-tint);
	color: var(--teal-deep);
}

.site-header__icons {
	display: flex;
	align-items: center;
	gap: 6px;
	flex-shrink: 0;
}

.site-header__search {
	position: relative;
}

.site-search {
	position: absolute;
	top: calc(100% + 8px);
	right: 0;
	display: flex;
	align-items: center;
	gap: 6px;
	width: min(280px, calc(100vw - 48px));
	background-color: var(--paper);
	border-radius: var(--radius-pill);
	box-shadow: var(--shadow-soft);
	padding: 6px 6px 6px 18px;
	opacity: 0;
	visibility: hidden;
	transform: translateY(4px);
	transition: opacity 0.3s var(--ease-brand), transform 0.3s var(--ease-brand), visibility 0.3s;
}

.site-search.is-open {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

.site-search__input {
	flex: 1;
	min-width: 0;
	border: none;
	outline: none;
	background: transparent;
	font-family: var(--font);
	font-size: 0.9rem;
	color: var(--text);
}

.site-search__input::placeholder {
	color: var(--text-faint);
}

.site-search__submit {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	flex-shrink: 0;
	border-radius: 50%;
	border: none;
	background-color: var(--teal);
	color: #ffffff;
	cursor: pointer;
	transition: background-color 0.3s var(--ease-brand);
}

.site-search__submit:hover {
	background-color: var(--teal-deep);
}

.site-search__submit svg {
	width: 15px;
	height: 15px;
}

.icon-btn {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	border-radius: 50%;
	border: none;
	background: transparent;
	color: var(--text);
	cursor: pointer;
	transition: background-color 0.3s ease, color 0.3s ease;
}

.icon-btn svg {
	width: 18px;
	height: 18px;
}

.icon-btn:hover {
	background-color: var(--teal-tint);
	color: var(--teal-deep);
}

.cart-count {
	position: absolute;
	top: 2px;
	right: 2px;
	width: 15px;
	height: 15px;
	border-radius: 50%;
	background-color: var(--teal);
	color: #ffffff;
	font-size: 0.58rem;
	font-weight: 700;
	display: flex;
	align-items: center;
	justify-content: center;
}

.mobile-toggle {
	display: none;
	flex-direction: column;
	justify-content: center;
	gap: 5px;
	width: 40px;
	height: 40px;
	border: none;
	background: transparent;
	cursor: pointer;
}

.mobile-toggle span {
	display: block;
	height: 2px;
	background-color: var(--text);
	border-radius: 2px;
}

.mobile-nav {
	display: none;
	flex-direction: column;
	padding: 8px 24px 20px;
	border-top: 1px solid var(--border);
}

.mobile-nav a {
	padding: 14px 0;
	font-weight: 500;
	border-bottom: 1px solid var(--border);
}

.mobile-nav a:last-child {
	border-bottom: none;
}

.mobile-nav.is-open {
	display: flex;
}

@media (max-width: 940px) {
	.site-header__nav {
		display: none;
	}

	.mobile-toggle {
		display: flex;
	}
}

/* ==========================================================================
   Product-card system — shared between the homepage's "Most Trusted
   Compounds" grid and the shop archive's full catalog grid.
   ========================================================================== */
.product-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 24px;
}

.product-card {
	display: flex;
	flex-direction: column;
	height: 100%;
}

.product-card__tile {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	aspect-ratio: 1 / 1;
	background-color: var(--bg-card);
	border-radius: var(--radius-card);
	box-shadow: var(--shadow-card);
	overflow: hidden;
	margin-bottom: 16px;
	transition: box-shadow 0.3s var(--ease-brand), transform 0.3s var(--ease-brand);
}

.product-card:hover .product-card__tile {
	box-shadow: var(--shadow-card-hover);
	transform: translateY(-4px);
}

.product-card__hex {
	width: 55%;
	stroke: var(--border);
	stroke-width: 1.5;
}

/* Real product photo, once uploaded — replaces the hex placeholder for
   that specific product only (checked via has a featured image). */
.product-card__image {
	width: 100%;
	height: 100%;
	object-fit: contain;
	padding: 10%;
	box-sizing: border-box;
}

.badge {
	position: absolute;
	top: 14px;
	left: 14px;
	height: 26px;
	padding: 0 13px;
	border-radius: var(--radius-pill);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: #ffffff;
}

.badge--teal { background-color: var(--teal); }
.badge--dark { background-color: var(--text); }

/* Reserves ~2 lines of height regardless of name length, so the row of
   elements below (rating/dose/price/button) starts at a consistent Y
   across cards with 1-line vs 2-line names; a rare 3-line name is allowed
   to wrap (clamped at 3 with ellipsis) rather than blowing out the card —
   final bottom alignment still comes from the auto-margin anchors below. */
.product-card__name {
	font-size: 0.95rem;
	font-weight: 700;
	line-height: 1.3;
	margin: 0 0 4px;
	min-height: calc(1.3em * 2);
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.product-card__name a {
	transition: color 0.3s ease;
}

.product-card__name a:hover {
	color: var(--teal-deep);
}

.product-card__dose {
	font-size: 0.82rem;
	color: var(--text-faint);
	margin-bottom: 6px;
}

.product-card__purity {
	font-size: 0.78rem;
	color: var(--teal-deep);
	font-weight: 600;
	margin-bottom: 6px;
}

.product-card__price {
	font-size: 0.95rem;
	font-weight: 700;
	color: var(--text);
}

/* Homepage cards have no button — price is their last element, so it's
   the one anchored to the card bottom there. On shop-grid cards the
   button is the last element instead (:last-child excludes price there),
   so this and the .product-card__btn rule below never both fire on the
   same card and fight over the same leftover space. */
.product-card__price:last-child {
	margin-top: auto;
}

.product-card__btn {
	margin-top: auto;
	height: 40px;
	padding: 0 20px;
	font-size: 0.85rem;
}

/* Star ratings — shared everywhere WooCommerce prints a .star-rating
   widget (product cards here, plus the single-product summary and
   review list, styled in shop.css). WooCommerce renders stars via its
   own icon font + a layered ::before/span::before pair, so recoloring
   is just these two color rules — structure/font stay untouched. */
.star-rating {
	font-size: 0.85rem;
}

.star-rating::before {
	color: var(--border);
}

.star-rating span::before {
	color: var(--copper);
}

/* Reserves space whether or not a given product has reviews yet, so
   product-card rows stay aligned across the grid regardless of mixed
   review counts (WooCommerce prints nothing at all for 0 reviews). */
.product-card__rating {
	min-height: 1.1em;
	margin-bottom: 6px;
}

@media (max-width: 999px) {
	.product-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 640px) {
	.product-grid {
		grid-template-columns: 1fr;
	}
}

/* ==========================================================================
   Footer — light, matching the mockup (not dark navy)
   ========================================================================== */
.site-footer {
	background-color: var(--paper);
	border-top: 1px solid var(--border);
	padding: 56px 0 0;
}

.site-footer__columns {
	display: grid;
	grid-template-columns: 1.4fr repeat(3, 1fr);
	gap: 32px;
	padding-bottom: 40px;
}

.footer-col h4 {
	font-size: 0.85rem;
	font-weight: 700;
	margin-bottom: 18px;
}

.footer-col ul {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.footer-col a {
	color: var(--text-muted);
	font-size: 0.88rem;
	transition: color 0.3s ease;
}

.footer-col a:hover {
	color: var(--teal-deep);
}

.footer-socials {
	display: flex;
	gap: 12px;
}

.footer-socials a {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	border: 1.5px solid var(--border);
	color: var(--text-muted);
	transition: color 0.3s ease, border-color 0.3s ease;
}

.footer-socials a svg {
	width: 16px;
	height: 16px;
}

.footer-socials a:hover {
	color: var(--teal-deep);
	border-color: var(--teal);
}

.site-footer__copyright {
	text-align: center;
	padding: 20px 24px;
	font-size: 0.82rem;
	color: var(--text-faint);
	border-top: 1px solid var(--border);
}

@media (max-width: 900px) {
	.site-footer__columns {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 600px) {
	.site-footer__columns {
		grid-template-columns: 1fr;
	}
}
