/* =============================================================================
 * erp-home.css — the front page, section by section, IN SOURCE ORDER:
 *   hero -> distributors -> supply-assurance -> products(+rail) -> community ->
 *   [OUR SEO ZONE] -> compliance/FAQ
 *
 * Ported selector-for-selector from source-cdp/css/app.css (`body.page-factory`
 * block, offset ~81867). Our body class is `erp-front` in ADDITION to the
 * source's `page-factory`, so lifted rules keep matching.
 * =============================================================================*/

body.page-factory {
	/* ⚠️ MEASURED, not copied. The source declares `background:#e9f1fb` here, but
	   its own `body{background-color:#fff!important}` beats it, so the page
	   ACTUALLY renders white (CDP: body background-color = rgb(255,255,255)).
	   We replicate what renders, not what was intended — the section cards sit
	   on white on the live site. --erp-page keeps the intended tint documented. */
	background: #fff;
	color: var(--erp-slate);
	padding-top: 0;
}

/* ⚠️ PRE-REDESIGN SECTIONS ONLY — `:not(.procure)` is load-bearing.
 *
 * This was written for the old factory homepage, where the hero was
 * `.factory-hero` and every other section was a centred card. The 2026-10
 * redesign replaced that homepage: its hero is `.procure-hero`, so it no longer
 * matched the `:not(.factory-hero)` exclusion and silently picked up BOTH
 * declarations —
 *
 *   margin: 32px auto   -> collapsed through `main` (no padding/border) and
 *                          pushed the whole page 32px down, so the fixed header
 *                          overlapped the hero. Measured: main.top 144 here vs
 *                          112 at source.
 *   max-width: container -> would clip the full-bleed navy hero and every
 *                          shopping section on desktop.
 *
 * `main` carries `.procure` only on the redesigned homepage, so excluding it
 * restores the old rule to exactly the sections it was written for.
 */
.factory-page:not(.procure) section:not(.factory-hero) {
	margin: 32px auto;
	max-width: var(--erp-container);
}

.factory-page h1,
.factory-page h2,
.factory-page h3 {
	color: var(--erp-navy);
}

.factory-page p {
	color: var(--erp-body-copy);
	line-height: 1.7;
}

/* ⚠️ CASCADE ORDER, and it matters.
   `.section-card--dark h2/p {color:#fff}` lives in erp-tokens.css (it is a
   shared primitive) but `.factory-page h2/p` lives HERE, in a file that loads
   later — at equal specificity (0,1,1) the later file wins, which painted the
   "Join Real Buyers…" and "Research Use Only" headings navy-on-navy, i.e.
   invisible. The source has the opposite file order, so its dark cards render
   white. Re-assert them here at (0,2,1) so the outcome matches the source
   regardless of how the stylesheets are ordered or concatenated later. */
.factory-page .section-card--dark h1,
.factory-page .section-card--dark h2,
.factory-page .section-card--dark h3,
.factory-page .section-card--dark p,
.factory-page .section-card--dark .section-header h2 {
	color: #fff;
}

.factory-section {
	padding: 0;
}

/* =========================================================================
 * 1. Hero
 * ========================================================================= */
.factory-hero {
	background:
		linear-gradient(135deg, rgba(5, 16, 38, 0.78), rgba(14, 36, 76, 0.7) 45%, rgba(24, 55, 110, 0.65)),
		url("../img/hero-supply.jpg") 50% / cover no-repeat;
}

.factory-hero .hero-inner {
	padding: 80px 0 70px;
}

.factory-hero .hero-layout {
	align-items: stretch;
	display: grid;
	gap: 28px;
	grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
}

.factory-hero .hero-content {
	background: rgba(8, 18, 40, 0.45);
	border-radius: 22px;
	box-shadow: 0 18px 40px rgba(0, 0, 0, 0.25);
	padding: 34px 36px;
}

.factory-hero .hero-eyebrow {
	color: rgba(255, 255, 255, 0.7);
	font-size: 0.8rem;
	letter-spacing: 0.22em;
	margin-bottom: 16px;
	text-transform: uppercase;
}

.factory-hero h1 {
	color: #fff;
	font-size: 3rem;
	margin-bottom: 12px;
	text-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
}

.factory-hero h2 {
	color: rgba(255, 255, 255, 0.88);
	font-size: 1.3rem;
	margin-bottom: 18px;
	text-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.factory-hero .hero-body {
	color: rgba(255, 255, 255, 0.8);
	margin-bottom: 0;
	max-width: 60ch;
}

.factory-hero .hero-cta {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin-top: 24px;
}

.factory-hero .hero-pillars {
	display: grid;
	gap: 16px;
}

.factory-hero .hero-pillar {
	backdrop-filter: blur(8px);
	background: rgba(255, 255, 255, 0.09);
	border: 1px solid rgba(255, 255, 255, 0.18);
	border-radius: 20px;
	box-shadow: 0 16px 28px rgba(0, 0, 0, 0.18);
	padding: 22px 22px 20px;
}

.factory-hero .hero-pillar h3 {
	color: #fff;
	font-size: 1.1rem;
	margin-bottom: 8px;
}

.factory-hero .hero-pillar p {
	color: rgba(255, 255, 255, 0.82);
	margin: 0;
}

.factory-hero .hero-pillar-label {
	background: var(--erp-gold-18);
	border: 1px solid var(--erp-gold-32);
	border-radius: var(--erp-r-pill);
	color: var(--erp-gold);
	display: inline-block;
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.08em;
	margin-bottom: 10px;
	padding: 5px 10px;
	text-transform: uppercase;
}

.factory-hero .btn-outline-light {
	border-color: rgba(255, 255, 255, 0.6);
	color: #fff;
}

/* =========================================================================
 * 2. Distributors — "Supplying Local Distributors Worldwide"
 * ========================================================================= */
.factory-distributors .section-subtitle {
	color: var(--erp-muted-2);
	margin-left: auto;
	margin-right: auto;
	margin-top: 8px;
	max-width: 760px;
}

.factory-distributors .supply-model-grid {
	display: grid;
	gap: 20px;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	margin-top: 28px;
}

.factory-distributors .supply-model-card {
	background: linear-gradient(180deg, #fff, #fbfdff);
	border: 1px solid var(--erp-line);
	border-radius: 22px;
	box-shadow: 0 14px 28px rgba(10, 26, 59, 0.08);
	min-height: 220px;
	overflow: hidden;
	padding: 28px 24px 24px;
	position: relative;
	transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.factory-distributors .supply-model-card::before {
	background: linear-gradient(90deg, #0a1a3b, #f6db7b);
	content: "";
	height: 4px;
	inset: 0 auto auto 0;
	position: absolute;
	width: 100%;
}

.factory-distributors .supply-model-card:hover {
	border-color: rgba(10, 26, 59, 0.14);
	box-shadow: 0 20px 36px rgba(10, 26, 59, 0.12);
	transform: translateY(-4px);
}

.factory-distributors .supply-model-step {
	align-items: center;
	background: var(--erp-navy);
	border-radius: var(--erp-r-pill);
	box-shadow: 0 8px 16px rgba(10, 26, 59, 0.18);
	color: #fff;
	display: inline-flex;
	font-weight: 600;
	height: 32px;
	justify-content: center;
	margin-bottom: 16px;
	width: 32px;
}

.factory-distributors .supply-model-card h3 {
	color: var(--erp-navy);
	font-size: 1.2rem;
	margin-bottom: 0.75rem;
}

.factory-distributors .supply-model-card p {
	color: var(--erp-muted-2);
	font-size: 1rem;
	line-height: 1.75;
	margin-bottom: 0.7rem;
}

.factory-distributors .supply-model-list {
	color: var(--erp-muted-2);
	display: grid;
	gap: 10px;
	list-style: none;
	margin: 0.65rem 0 0;
	padding-left: 0;
}

.factory-distributors .supply-model-list li {
	padding-left: 24px;
	position: relative;
}

.factory-distributors .supply-model-list li::before {
	color: var(--erp-navy);
	content: "\2022";
	font-weight: 700;
	left: 8px;
	position: absolute;
	top: 0;
}

.factory-distributors .supply-model-note {
	border-top: 1px solid var(--erp-line);
	color: var(--erp-navy) !important;
	font-size: 0.95rem !important;
	font-weight: 600;
	margin-bottom: 0 !important;
	margin-top: 12px;
	padding-top: 12px;
}

@media (max-width: 992px) {
	.factory-distributors .supply-model-grid {
		grid-template-columns: 1fr;
	}
}

/* =========================================================================
 * 3. Supply Assurance System
 * ========================================================================= */
.factory-assurance .assurance-grid {
	display: grid;
	gap: 20px;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	margin-top: 24px;
}

.factory-assurance .assurance-card {
	background: linear-gradient(180deg, #fff, #fbfcff);
	border: 1px solid var(--erp-line);
	border-radius: 22px;
	box-shadow: 0 14px 28px rgba(10, 26, 59, 0.06);
	display: grid;
	gap: 14px;
	height: 100%;
	padding: 24px;
}

.factory-assurance .assurance-card-top {
	align-items: center;
	display: flex;
	gap: 12px;
	justify-content: space-between;
}

.factory-assurance .assurance-icon {
	align-items: center;
	background: var(--erp-line);
	border-radius: var(--erp-r-tile);
	color: var(--erp-navy);
	display: inline-flex;
	font-size: 1.2rem;
	height: 48px;
	justify-content: center;
	width: 48px;
}

.factory-assurance .assurance-tag {
	align-items: center;
	background: var(--erp-gold-28);
	border-radius: var(--erp-r-pill);
	color: var(--erp-gold-ink);
	display: inline-flex;
	font-size: 0.75rem;
	font-weight: 700;
	justify-content: center;
	letter-spacing: 0.08em;
	padding: 6px 12px;
	text-transform: uppercase;
}

.factory-assurance .assurance-card h3 {
	font-size: 1.9rem;
	margin: 0;
}

.factory-assurance .assurance-card > p {
	color: var(--erp-muted-2);
	line-height: 1.65;
	margin: 0;
}

.factory-assurance .assurance-list {
	display: grid;
	gap: 10px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.factory-assurance .assurance-list li {
	color: #334155;
	line-height: 1.6;
	padding-left: 18px;
	position: relative;
}

.factory-assurance .assurance-list li::before {
	background: var(--erp-gold);
	border-radius: var(--erp-r-pill);
	content: "";
	height: 7px;
	left: 0;
	position: absolute;
	top: 0.7em;
	transform: translateY(-50%);
	width: 7px;
}

.factory-assurance .assurance-note {
	border-top: 1px solid var(--erp-line);
	color: var(--erp-navy);
	font-weight: 600;
	margin: 0;
	padding-top: 14px;
}

/* =========================================================================
 * 4. Factory hot products + the drag-to-scroll rail
 * ========================================================================= */
.factory-products .catalog-entry-banner {
	align-items: center;
	background: linear-gradient(135deg, rgba(10, 26, 59, 0.04), var(--erp-gold-12));
	border: 1px solid var(--erp-line);
	border-radius: 20px;
	display: flex;
	gap: 18px;
	justify-content: space-between;
	margin: 18px 0 22px;
	padding: 20px 22px;
}

.factory-products .catalog-entry-copy {
	display: grid;
	gap: 6px;
}

.factory-products .catalog-entry-copy strong {
	color: var(--erp-navy);
	font-size: 1.05rem;
}

.factory-products .catalog-entry-copy span {
	color: var(--erp-muted-2);
	line-height: 1.6;
}

.factory-products .catalog-entry-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	justify-content: flex-end;
}

/* ⚠️ The rail wrapper carries BOTH classes: `prime-selections-section
   factory-prime-selections`. The source declares `.factory-prime-selections
   {padding:10px 0 0}` and then, LATER in the same stylesheet at equal
   specificity, `.prime-selections-section{padding:30px 0 0}` — so 30px is what
   actually renders, and ≤768px adds `padding-bottom:50px`. Measured, not
   assumed: reading only the `.factory-*` rule left this section 20px short at
   1440/820 and 70px short at 390. */
.factory-prime-selections,
.prime-selections-section {
	padding: 30px 0 0;
}

@media (max-width: 768px) {
	.factory-prime-selections,
	.prime-selections-section {
		padding-bottom: 50px;
	}
}

.factory-products .factory-products-rail {
	cursor: grab;
	display: flex;
	gap: 24px;
	overflow-x: auto;
	overflow-y: hidden;
	padding: 4px 2px 14px;
	scroll-snap-type: x proximity;
	scrollbar-color: rgba(10, 26, 59, 0.24) transparent;
	scrollbar-width: thin;
}

.factory-products .factory-products-rail::-webkit-scrollbar {
	height: 8px;
}

.factory-products .factory-products-rail::-webkit-scrollbar-thumb {
	background: rgba(10, 26, 59, 0.22);
	border-radius: var(--erp-r-pill);
}

.factory-products .factory-products-rail.is-dragging {
	cursor: grabbing;
}

.factory-products .factory-product-item {
	flex: 0 0 calc(25% - 18px);
	min-width: 220px;
	scroll-snap-align: start;
}

.factory-products .section-cta {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	justify-content: center;
	margin-top: 28px;
}

/* Empty rail (before catalog import + an emptied curated list). */
.factory-products .factory-products-empty {
	border: 1px dashed var(--erp-line-2);
	border-radius: 20px;
	color: var(--erp-muted-2);
	padding: 40px 24px;
	text-align: center;
}

/* =========================================================================
 * 5. Community
 * ========================================================================= */
.factory-community .community-proof {
	display: grid;
	gap: 14px;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	margin: 26px auto 20px;
	max-width: 980px;
}

.factory-community .community-proof-item {
	background: rgba(255, 255, 255, 0.08);
	border: 1px solid var(--erp-line-light);
	border-radius: var(--erp-r-card);
	padding: 18px 20px;
	text-align: center;
}

.factory-community .community-proof-item strong {
	color: #fff;
	display: block;
	font-size: 1.4rem;
	font-weight: 700;
	margin-bottom: 6px;
}

.factory-community .community-proof-item span {
	color: rgba(255, 255, 255, 0.78);
	font-size: 0.95rem;
}

.factory-community .community-intro {
	margin: 0 auto 24px;
	max-width: 920px;
	text-align: center;
}

.factory-community .community-intro p {
	color: rgba(255, 255, 255, 0.84);
	font-size: 1rem;
	margin: 0;
}

.factory-community .community-links {
	display: grid;
	gap: 16px;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	margin-top: 24px;
}

.factory-community .community-card {
	align-items: center;
	background: linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.06));
	border: 1px solid var(--erp-line-light);
	border-radius: var(--erp-r-card);
	color: #fff;
	display: grid;
	gap: 14px;
	grid-template-columns: auto 1fr auto;
	padding: 20px 18px;
	text-decoration: none;
	transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.factory-community .community-card:hover {
	border-color: rgba(246, 219, 123, 0.35);
	box-shadow: 0 16px 28px rgba(0, 0, 0, 0.14);
	transform: translateY(-3px);
}

.factory-community .community-icon {
	align-items: center;
	background: var(--erp-line-light);
	border-radius: 12px;
	display: inline-flex;
	flex-shrink: 0;
	height: 54px;
	justify-content: center;
	width: 54px;
}

.factory-community .community-icon i {
	color: #fff;
	font-size: 1.45rem;
}

.factory-community .community-card h3 {
	color: #fff;
	margin-bottom: 6px;
}

.factory-community .community-card p {
	color: rgba(255, 255, 255, 0.8);
	line-height: 1.55;
	margin: 0;
}

/* A channel whose Customizer URL is still unset: identical card, but it points
   at our own contact page instead of a group invite. Hook kept so the styling
   can diverge later without touching the template. */
.factory-community .community-card--fallback {
	/* intentionally identical to .community-card */
}

.factory-community .community-cta {
	align-items: center;
	background: var(--erp-gold);
	border-radius: var(--erp-r-pill);
	color: var(--erp-navy);
	display: inline-flex;
	font-size: 0.82rem;
	font-weight: 700;
	justify-content: center;
	letter-spacing: 0.05em;
	padding: 10px 14px;
	text-transform: uppercase;
	white-space: nowrap;
}

/* =========================================================================
 * 6. SEO content zone (LOCKED standard #6) — OUR addition, not the source's.
 *    Rendered from the assigned front page's editor content, so it is edited at
 *    wp-admin -> Pages -> Home. Styled to the theme's own fonts + prose.
 * ========================================================================= */
.factory-seo .seo-shell {
	margin: 0 auto;
	max-width: 980px;
}

.factory-seo .seo-eyebrow {
	color: var(--erp-navy);
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.18em;
	margin-bottom: 10px;
	text-transform: uppercase;
}

.factory-seo .seo-body h2 {
	color: var(--erp-navy);
	font-size: 2.2rem;
	line-height: 1.2;
	margin-bottom: 14px;
}

.factory-seo .seo-body h3 {
	color: var(--erp-navy);
	font-size: 1.25rem;
	margin: 22px 0 10px;
}

.factory-seo .seo-body p {
	color: var(--erp-muted);
	font-size: 1rem;
	line-height: 1.8;
	margin-bottom: 1rem;
}

.factory-seo .seo-body p:last-child {
	margin-bottom: 0;
}

.factory-seo .seo-body a {
	color: var(--erp-navy);
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.factory-seo .seo-body ul,
.factory-seo .seo-body ol {
	color: var(--erp-muted);
	display: grid;
	gap: 8px;
	line-height: 1.7;
	margin: 0 0 1rem;
	padding-left: 1.2rem;
}

.factory-seo .seo-body strong {
	color: var(--erp-navy);
}

@media (max-width: 768px) {
	.factory-seo .seo-body h2 {
		font-size: 1.5rem;
	}
}

/* =========================================================================
 * 7. Compliance / FAQ
 * ========================================================================= */
.factory-compliance .section-card--dark {
	background: var(--erp-navy);
}

.faq-section {
	margin: 32px 0;
}

.faq-section .faq-shell {
	background: #fff;
	border-radius: var(--erp-r-shell);
	box-shadow: var(--erp-shadow-section);
	padding: 32px;
}

.faq-section .faq-header {
	margin: 0 auto 24px;
	max-width: 760px;
}

.faq-section .faq-title {
	color: var(--erp-navy);
	font-size: 2.2rem;
	margin-bottom: 10px;
}

.faq-section .faq-subtitle {
	color: var(--erp-muted-4);
	font-size: 1rem;
	margin: 0;
}

.faq-section .faq-list {
	display: grid;
	gap: 14px;
}

.faq-section .faq-item {
	background: var(--erp-panel);
	border: 1px solid var(--erp-line-2);
	border-radius: var(--erp-r-card);
	overflow: hidden;
}

.faq-section .faq-question {
	align-items: center;
	color: var(--erp-navy);
	cursor: pointer;
	display: flex;
	font-family: var(--erp-font-body);
	font-size: 1.02rem;
	font-weight: 600;
	gap: 16px;
	justify-content: space-between;
	list-style: none;
	padding: 18px 22px;
}

.faq-section .faq-question::-webkit-details-marker {
	display: none;
}

.faq-section .faq-icon {
	flex-shrink: 0;
	transition: transform 0.2s ease;
}

.faq-section .faq-item[open] .faq-icon {
	transform: rotate(45deg);
}

.faq-section .faq-answer {
	color: var(--erp-muted);
	line-height: 1.75;
	padding: 0 22px 20px;
}

@media (max-width: 768px) {
	.faq-section {
		margin: 20px 0;
	}
	.faq-section .faq-shell {
		border-radius: var(--erp-r-card);
		padding: 20px 16px;
	}
	.faq-section .faq-title {
		font-size: 1.5rem;
	}
	.faq-section .faq-question {
		font-size: 0.95rem;
		padding: 16px;
	}
	.faq-section .faq-answer {
		font-size: 0.92rem;
		padding: 0 16px 16px;
	}
}

/* =========================================================================
 * 8. Responsive (source breakpoints, verbatim)
 * ========================================================================= */
@media (max-width: 991px) {
	.factory-hero .hero-layout {
		grid-template-columns: 1fr;
	}
	.factory-assurance .assurance-grid {
		grid-template-columns: 1fr 1fr;
	}
	.factory-products .factory-product-item {
		flex-basis: calc(50% - 12px);
	}
	.factory-products .catalog-entry-banner {
		align-items: flex-start;
		flex-direction: column;
	}
	.factory-products .catalog-entry-actions {
		justify-content: flex-start;
	}
	.factory-community .community-links,
	.factory-community .community-proof {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 768px) {
	.factory-hero .hero-inner {
		padding: 70px 0 60px;
	}
	.factory-hero .hero-content {
		padding: 24px 20px;
	}
	.factory-hero h1 {
		font-size: 2.4rem;
	}
	.factory-hero h2 {
		font-size: 1.08rem;
	}
	.factory-assurance .assurance-grid {
		grid-template-columns: 1fr;
	}
	.factory-products .factory-products-rail {
		gap: 16px;
	}
	.factory-products .factory-product-item {
		flex-basis: 78%;
		min-width: 240px;
	}
	.factory-hero .hero-cta .btn,
	.factory-products .catalog-entry-actions,
	.factory-products .catalog-entry-actions .btn,
	.factory-products .section-cta,
	.factory-products .section-cta .btn {
		width: 100%;
	}
	.factory-community .community-card {
		grid-template-columns: auto 1fr;
	}
	.factory-community .community-cta {
		grid-column: 1 / -1;
		margin-top: 6px;
		width: 100%;
	}
	.factory-assurance .assurance-card {
		padding: 20px;
	}
	.factory-assurance .assurance-card h3 {
		font-size: 1.5rem;
	}
}
