/**
 * Masstone Supply — brand tokens (from local React / Tailwind).
 * CSS variables so parent Click AI utilities pick up the palette.
 */

:root {
	--color-brand-primary: #d71920;
	--color-brand-primary-hover: #a91218;
	--color-brand-secondary: #0b1f3a;
	--color-brand-navy: #0b1f3a;
	--color-brand-soft: #fde8e9;
	--color-brand-dark: #0b1f3a;
	--color-brand-light: #f7f8fa;
	--color-brand-warm: #f7f8fa;

	--color-surface: #ffffff;
	--color-surface-card: #ffffff;
	--color-ink: #0b1f3a;
	--color-muted: #4b5563;
	--color-border: #e5e7eb;

	--color-brand-navy-2: #12345a;
	--shadow-brand: 0 1px 2px rgb(11 31 58 / 0.06), 0 4px 12px rgb(11 31 58 / 0.08);
}

/* Navy footer (React look) — parent footer uses bg-brand-light by default */
body.click-ai .masstone-footer {
	background-color: #0b1f3a;
	color: #fff;
	border-top: none;
}

body.click-ai .masstone-footer a {
	color: rgb(255 255 255 / 0.7);
}

body.click-ai .masstone-footer a:hover {
	color: #fff;
}

body.click-ai .masstone-footer .masstone-footer__muted {
	color: rgb(255 255 255 / 0.5);
}

.masstone-footer__bottom {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: space-between;
	gap: 1.25rem;
	padding: 1.5rem 0;
	text-align: center;
}

.masstone-footer__agency {
	display: inline-flex;
	align-items: center;
	text-decoration: none;
	opacity: 0.9;
	transition: opacity 0.2s ease;
}

.masstone-footer__agency:hover {
	opacity: 1;
}

.masstone-footer__agency-logo {
	display: block;
	height: 2rem;
	width: auto;
	max-width: 150px;
	object-fit: contain;
}

@media (min-width: 768px) {
	.masstone-footer__bottom {
		flex-direction: row;
		align-items: center;
		text-align: left;
	}
}

/* ── Header (self-contained; do not rely on Tailwind purge) ── */
.masstone-header.cai-header {
	position: sticky;
	top: 0;
	z-index: 50;
	background-color: #fff;
	border-bottom: 1px solid #e5e7eb;
	box-shadow: 0 1px 0 rgb(11 31 58 / 0.04);
}

.masstone-header__bar {
	display: flex;
	align-items: center;
	gap: 1.25rem;
	min-height: 4.5rem;
	padding: 0.65rem 0;
}

.masstone-header__brand {
	display: flex;
	align-items: center;
	flex-shrink: 0;
	line-height: 0;
}

.masstone-header__logo {
	display: block;
	height: 2.65rem;
	width: auto;
	max-width: 190px;
	object-fit: contain;
	object-position: left center;
}

.masstone-nav {
	display: none;
	align-items: center;
	min-width: 0;
	flex: 1 1 auto;
}

.masstone-nav__list {
	display: flex;
	flex-wrap: nowrap;
	align-items: center;
	justify-content: flex-start;
	gap: 0.1rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.masstone-nav__trigger {
	display: inline-flex;
	align-items: center;
	gap: 0.25rem;
	padding: 0.45rem 0.55rem;
	border: 0;
	border-radius: 0.5rem;
	background: transparent;
	color: #0b1f3a;
	font: inherit;
	font-size: 0.875rem;
	font-weight: 600;
	line-height: 1.2;
	white-space: nowrap;
	text-decoration: none;
	cursor: pointer;
	transition: background-color 0.15s ease, color 0.15s ease;
}

.masstone-nav__trigger:hover,
.masstone-nav__item.is-mega-open > .masstone-nav__trigger {
	background: #f7f8fa;
	color: #0b1f3a;
}

.masstone-nav__chevron {
	width: 0.85rem;
	height: 0.85rem;
	flex-shrink: 0;
	opacity: 0.55;
}

.masstone-nav-featured {
	color: #d71920 !important;
	font-weight: 800 !important;
}

.masstone-nav-featured:hover {
	background: #fde8e9 !important;
	color: #a91218 !important;
}

.masstone-header__actions {
	display: none;
	align-items: center;
	justify-content: flex-end;
	gap: 0.85rem;
	flex-shrink: 0;
	margin-left: auto;
}

.masstone-header-phone {
	display: inline-flex;
	align-items: center;
	color: #0b1f3a;
	text-decoration: none;
	line-height: 1;
	transition: color 0.15s ease;
}

.masstone-header-phone:hover {
	color: #d71920;
}

.masstone-header-phone__number {
	font-size: 1.125rem;
	font-weight: 800;
	letter-spacing: -0.02em;
	white-space: nowrap;
}

.masstone-header__cta {
	white-space: nowrap;
}

.masstone-header__burger {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.5rem;
	height: 2.5rem;
	margin-left: auto;
	border: 1px solid #e5e7eb;
	border-radius: 0.65rem;
	background: #fff;
	color: #0b1f3a;
	cursor: pointer;
	box-shadow: 0 1px 2px rgb(11 31 58 / 0.06);
}

.masstone-header__mobile {
	border-top: 1px solid #e5e7eb;
	background: #fff;
}

.masstone-header__mobile-inner {
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
	max-height: min(78vh, 640px);
	overflow-y: auto;
	padding: 1rem 0 1.25rem;
}

.masstone-header__mobile-cta {
	padding-top: 0.75rem;
}

.masstone-header-phone--mobile {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 0.15rem;
	margin-top: 0.5rem;
	padding: 0.85rem 1rem;
	border: 1px solid #e5e7eb;
	border-radius: 0.75rem;
	background: #f7f8fa;
}

.masstone-header-phone__label {
	font-size: 0.7rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: #4b5563;
}

.masstone-header-phone--mobile .masstone-header-phone__number {
	font-size: 1.35rem;
}

.masstone-nav-featured-mobile {
	color: #d71920 !important;
	font-weight: 700 !important;
	background: #fde8e9;
}

@media (min-width: 768px) {
	.masstone-header__bar {
		min-height: 4.75rem;
		padding: 0.75rem 0;
		gap: 1.5rem;
	}

	.masstone-header__logo {
		height: 2.85rem;
		max-width: 200px;
	}

	.masstone-nav {
		display: flex;
	}

	.masstone-header__actions {
		display: flex;
	}

	.masstone-header__burger {
		display: none;
	}
}

@media (min-width: 1100px) {
	.masstone-header__logo {
		height: 3rem;
		max-width: 220px;
	}

	.masstone-nav__trigger {
		padding: 0.5rem 0.7rem;
		font-size: 0.9375rem;
	}

	.masstone-header-phone__number {
		font-size: 1.35rem;
	}

	.masstone-header__actions {
		gap: 1.1rem;
	}
}

@media (max-width: 1100px) and (min-width: 768px) {
	.masstone-nav__trigger {
		padding: 0.4rem 0.45rem;
		font-size: 0.8125rem;
	}

	.masstone-header-phone__number {
		font-size: 1.05rem;
	}
}

/* Product / service cards */
.masstone-card {
	transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.masstone-card:hover {
	box-shadow: 0 10px 25px rgb(11 31 58 / 0.1);
	transform: translateY(-2px);
	border-color: rgb(215 25 32 / 0.35);
}

.masstone-card img {
	display: block;
}

/* Hero overlays */
.masstone-hero-home {
	background-image: url('https://masstonesupply.com/wp-content/uploads/2026/07/Hero.png');
	background-size: cover;
	background-position: center right;
}

/* Soften band so product photos underneath read better */
.masstone-hero-band {
	background-image:
		linear-gradient(135deg, rgb(11 31 58 / 0.82), rgb(18 52 90 / 0.75)),
		url('https://masstonesupply.com/wp-content/uploads/2026/07/banner2-1.jpg');
	background-size: cover;
	background-position: center;
}

/* Outline buttons on light hero */
.masstone .btn-outline {
	background: rgb(255 255 255 / 0.92);
}

/* Keep product photo cards readable on mobile */
@media (max-width: 640px) {
	.masstone-hero-home {
		background-position: 70% center;
	}
}

/* Mega layouts — self-contained (do not rely on Tailwind purge) */
.masstone-mega-products {
	display: grid;
	gap: 1.25rem;
}

@media (min-width: 1024px) {
	.masstone-mega-products {
		grid-template-columns: minmax(240px, 0.95fr) minmax(0, 2.05fr);
		gap: 1.5rem;
		align-items: start;
	}
}

.masstone-mega-products__grid {
	display: grid;
	gap: 0.75rem;
	margin-top: 0.75rem;
}

@media (min-width: 640px) {
	.masstone-mega-products__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (min-width: 1280px) {
	.masstone-mega-products__grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

.masstone-mega-areas__grid {
	display: grid;
	gap: 0.75rem;
	margin-top: 0.75rem;
}

@media (min-width: 640px) {
	.masstone-mega-areas__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (min-width: 1024px) {
	.masstone-mega-areas__grid {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
}

.masstone-mega-img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.3s ease;
}

.group:hover .masstone-mega-img {
	transform: scale(1.04);
}

.masstone-mega-card__copy {
	min-width: 0;
}

/* Mega menu product cards */
.masstone-mega-card {
	display: flex;
	gap: 0.75rem;
	align-items: flex-start;
	min-width: 0;
	padding: 0.65rem;
	border: 1px solid #e5e7eb;
	border-radius: 0.75rem;
	background: #fff;
	text-decoration: none;
	color: inherit;
	transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.masstone-mega-card:hover {
	border-color: rgb(215 25 32 / 0.35);
	box-shadow: 0 8px 20px rgb(11 31 58 / 0.08);
	transform: translateY(-1px);
}

.masstone-mega-card__thumb {
	display: block;
	width: 3.25rem;
	height: 3.25rem;
	flex-shrink: 0;
	overflow: hidden;
	border-radius: 0.5rem;
	background: #f7f8fa;
}

.masstone-mega-card__media {
	display: block;
	width: 100%;
	aspect-ratio: 16 / 10;
	overflow: hidden;
	border-radius: 0.5rem;
	background: #f7f8fa;
	margin-bottom: 0.55rem;
}

.masstone-mega-card--stack {
	flex-direction: column;
	gap: 0;
	padding: 0.55rem;
}

.masstone-mega-card__title {
	display: block;
	font-size: 0.9rem;
	font-weight: 700;
	color: #0b1f3a;
	line-height: 1.25;
}

.masstone-mega-card__text {
	display: block;
	margin-top: 0.2rem;
	font-size: 0.75rem;
	line-height: 1.4;
	color: #4b5563;
}

.masstone-mega-card:hover .masstone-mega-card__title {
	color: #d71920;
}

/* Featured calcium carbonate mega panel */
.masstone-mega-featured {
	display: flex;
	flex-direction: column;
	overflow: hidden;
	border: 1px solid rgb(215 25 32 / 0.25);
	border-radius: 1rem;
	background: linear-gradient(180deg, #fff 0%, #fde8e9 100%);
	text-decoration: none;
	color: inherit;
	box-shadow: 0 8px 24px rgb(215 25 32 / 0.08);
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.masstone-mega-featured:hover {
	transform: translateY(-2px);
	box-shadow: 0 12px 28px rgb(215 25 32 / 0.14);
}

.masstone-mega-featured__media {
	aspect-ratio: 16 / 10;
	overflow: hidden;
	background: #f7f8fa;
}

.masstone-mega-featured__body {
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
	padding: 1rem 1.1rem 1.15rem;
}

.masstone-mega-featured__badge {
	display: inline-flex;
	align-self: flex-start;
	padding: 0.2rem 0.55rem;
	border-radius: 999px;
	background: #d71920;
	color: #fff;
	font-size: 0.65rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.masstone-mega-featured__title {
	font-size: 1.15rem;
	font-weight: 800;
	color: #0b1f3a;
	line-height: 1.2;
}

.masstone-mega-featured__text {
	font-size: 0.85rem;
	line-height: 1.45;
	color: #4b5563;
}

.masstone-mega-featured__cta {
	margin-top: 0.35rem;
	font-size: 0.85rem;
	font-weight: 700;
	color: #d71920;
}

.masstone-mega-featured--mobile {
	flex-direction: row;
	align-items: stretch;
}

.masstone-mega-featured--mobile .masstone-mega-featured__media {
	width: 5.5rem;
	aspect-ratio: 1;
	flex-shrink: 0;
}

.masstone-mega-featured--mobile .masstone-mega-featured__body {
	justify-content: center;
	padding: 0.75rem;
}

