/*
Theme Name: HB3D Fab Child
Theme URI: https://hb3dfab.com
Description: Child theme for HB Fabrication — dark default + light toggle, HB blue/green palette.
Author: HB Fabrication
Template: bluehost-blueprint
Version: 0.3.4
Text Domain: hb3dfab-child
*/

:root {
	--hbfab-gradient-brand: linear-gradient(90deg, #1b75bc 0%, #00a99d 45%, #8dc63f 100%);
}

/* Dark default (theme.json). Light when html.hbfab-light */
html.hbfab-light body {
	color-scheme: light;
}

html.hbfab-light {
	--wp--preset--color--base: #ffffff;
	--wp--preset--color--base-midtone: #f0f4f8;
	--wp--preset--color--contrast-midtone: #5a6b7d;
	--wp--preset--color--contrast: #1b2838;
}

html:not(.hbfab-light) body {
	color-scheme: dark;
}

/* Blueprint primary-15 band — light tint surface needs dark text in dark mode */
.is-style-nfd-theme-primary-15 {
	--wndb--color--text: #1b2838;
	--wndb--color--text--contrast: #121416;
	--wndb--color--text--faded: #3d4f63;
	color: #1b2838;
}

.is-style-nfd-theme-primary-15 .wp-block-heading,
.is-style-nfd-theme-primary-15 .wp-block-paragraph,
.is-style-nfd-theme-primary-15 p,
.is-style-nfd-theme-primary-15 li {
	color: #1b2838 !important;
	-webkit-text-fill-color: #1b2838 !important;
}

.is-style-nfd-theme-primary-15 a {
	color: var(--wp--preset--color--accent-1, #1b75bc) !important;
	-webkit-text-fill-color: var(--wp--preset--color--accent-1, #1b75bc) !important;
}

.is-style-nfd-theme-primary-15 a:hover {
	color: var(--wp--preset--color--accent-2, #8dc63f) !important;
	-webkit-text-fill-color: var(--wp--preset--color--accent-2, #8dc63f) !important;
}

/* Home page — customer gallery */
.hbfab-customer-gallery .hbfab-customer-gallery-intro {
	color: var(--wp--preset--color--contrast-midtone);
	max-width: 42rem;
	margin-left: auto;
	margin-right: auto;
}

.hbfab-customer-gallery .hbfab-customer-gallery-empty {
	color: var(--wp--preset--color--contrast-midtone);
	max-width: 36rem;
	margin-left: auto;
	margin-right: auto;
}

.hbfab-customer-gallery .hbfab-customer-gallery-grid {
	margin-top: 1.5rem;
}

.hbfab-customer-gallery .hbfab-customer-gallery-photo img {
	border-radius: 12px;
	width: 100%;
	height: auto;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	display: block;
}

.hbfab-customer-gallery .hbfab-customer-gallery-photo figcaption {
	margin-top: 0.5rem;
	color: var(--wp--preset--color--contrast-midtone);
	font-size: 0.9rem;
	line-height: 1.4;
	text-align: center;
}

.hbfab-customer-gallery .hbfab-customer-gallery-photo figcaption a {
	color: var(--wp--preset--color--accent-1, #1b75bc);
	text-decoration: none;
}

.hbfab-customer-gallery .hbfab-customer-gallery-photo figcaption a:hover {
	color: var(--wp--preset--color--accent-2, #8dc63f);
	text-decoration: underline;
}

@media (max-width: 782px) {
	.hbfab-customer-gallery .hbfab-customer-gallery-grid.wp-block-columns {
		flex-direction: column;
	}
}

/* Top branding bar — logo + theme toggle (FSE themes lack classic Customizer) */
.hbfab-top-bar {
	background: var(--hbfab-gradient-brand);
	padding: 0.5rem 1.25rem;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	flex-wrap: wrap;
}

.hbfab-top-bar a.hbfab-logo-link {
	display: flex;
	align-items: center;
	text-decoration: none;
}

.hbfab-top-bar img.hbfab-logo {
	max-height: 64px;
	width: auto;
	height: auto;
	display: block;
	-webkit-flex-shrink: 0;
	flex-shrink: 0;
}

/* Product search in gradient top bar */
.hbfab-header-search {
	flex: 1 1 12rem;
	max-width: 28rem;
	min-width: 10rem;
}

.hbfab-header-search form.woocommerce-product-search,
.hbfab-header-search .woocommerce-product-search {
	display: flex;
	align-items: center;
	gap: 0.35rem;
	margin: 0;
	width: 100%;
}

.hbfab-header-search input[type="search"] {
	flex: 1;
	min-height: 2.25rem;
	border-radius: 999px;
	border: 1px solid rgba(255, 255, 255, 0.75);
	background: rgba(0, 0, 0, 0.2);
	color: #fff;
	padding: 0.4rem 0.9rem;
	font-size: 0.95rem;
}

.hbfab-header-search input[type="search"]::placeholder {
	color: rgba(255, 255, 255, 0.75);
}

.hbfab-header-search button[type="submit"] {
	border-radius: 999px;
	border: 1px solid rgba(255, 255, 255, 0.85);
	background: rgba(0, 0, 0, 0.25);
	color: #fff;
	padding: 0.4rem 0.85rem;
	font-size: 0.85rem;
	cursor: pointer;
}

/* Duplicate Blueprint site-logo hidden — branding is in .hbfab-top-bar only */
header .wp-block-site-logo {
	display: none !important;
}

/* Nav row — nav left, Find us on + socials right */
.hbfab-top-bar + header.wp-block-template-part {
	margin-top: 0;
}

header.wp-block-template-part > header.wp-block-group.has-global-padding {
	margin-top: 0;
	padding-top: 0;
	padding-bottom: 0;
}

header .hbfab-nav-row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.5rem 1rem;
	padding: 0 !important;
	min-height: 2.5rem;
	box-sizing: border-box;
}

header .hbfab-nav-row > .wp-block-navigation {
	margin: 0;
	padding: 0;
	flex: 0 1 auto;
	justify-content: flex-start !important;
	align-self: center;
	line-height: 1;
	min-height: 0;
}

header .hbfab-nav-row .wp-block-navigation__responsive-container,
header .hbfab-nav-row .wp-block-navigation__responsive-close,
header .hbfab-nav-row .wp-block-navigation__responsive-dialog,
header .hbfab-nav-row .wp-block-navigation__responsive-container-content {
	margin: 0;
	padding: 0;
	min-height: 0;
	display: flex;
	align-items: center;
}

header .hbfab-nav-row .wp-block-navigation-item {
	margin: 0;
	padding: 0;
}

header .hbfab-nav-row .wp-block-navigation-item__content {
	padding-block: 0;
}

header .hbfab-nav-row .wp-block-navigation .wp-block-navigation__container,
header .hbfab-nav-row .wp-block-navigation.is-content-justification-right {
	justify-content: flex-start !important;
}

header .hbfab-nav-social-cluster {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	flex: 0 0 auto;
	margin-left: auto;
	align-self: center;
	line-height: 1.2;
}

header .hbfab-nav-social-icons .wp-block-social-link {
	margin: 0;
	padding: 0;
}

header .hbfab-find-us-label {
	color: var(--wp--preset--color--contrast-midtone);
	font-size: 1rem;
	font-weight: 400;
	line-height: 1;
	white-space: nowrap;
}

header .hbfab-nav-row .wp-block-navigation .wp-block-navigation-item__label {
	font-size: 1rem;
	line-height: 1;
}

header .hbfab-nav-social-icons {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

header .hbfab-nav-social-cluster a,
header .hbfab-nav-social-icons .wp-block-social-link-anchor {
	color: var(--wp--preset--color--contrast-midtone) !important;
	-webkit-text-fill-color: var(--wp--preset--color--contrast-midtone) !important;
}

header .hbfab-nav-social-icons .wp-block-social-link-anchor svg {
	fill: currentColor !important;
}

header .hbfab-nav-social-cluster a:hover,
header .hbfab-nav-social-icons .wp-block-social-link-anchor:hover {
	color: var(--wp--preset--color--accent-1) !important;
	-webkit-text-fill-color: var(--wp--preset--color--accent-1) !important;
}

.hbfab-hide-orphan-bullet {
	display: none !important;
}

/* Blueprint header — site title on gradient/brand bar (force white; Safari + accent presets) */
.wp-block-site-title,
.wp-block-site-title a,
h1.wp-block-site-title,
header .wp-block-site-title,
header .wp-block-site-title a,
.site-header .wp-block-site-title a,
.wp-block-group .wp-block-site-title,
.wp-block-group .wp-block-site-title a,
.wp-block-group.has-background .wp-block-site-title a,
[class*="has-accent"][class*="-color"] .wp-block-site-title,
[class*="has-accent"][class*="-color"] .wp-block-site-title a {
	color: #ffffff !important;
	-webkit-text-fill-color: #ffffff !important;
	text-decoration: none;
	text-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
}

header .wp-block-site-title a:hover,
.wp-block-site-title a:hover {
	color: #ffffff !important;
	-webkit-text-fill-color: #ffffff !important;
	opacity: 0.95;
}

/* Blueprint demo address strip only */
.hbfab-hide-demo-address {
	display: none !important;
}

/* Blueprint header nav + commerce icons — theme contrast tokens */
header .wp-block-navigation .wp-block-navigation-item__content,
header .wp-block-navigation .wp-block-navigation-item__label,
header .wp-block-navigation .wp-block-navigation__responsive-container-content a {
	color: var(--wp--preset--color--contrast) !important;
	-webkit-text-fill-color: var(--wp--preset--color--contrast) !important;
}

header .wp-block-navigation .wp-block-navigation-item__content:hover,
header .wp-block-navigation .wp-block-navigation-item__content:focus {
	color: var(--wp--preset--color--accent-1) !important;
	-webkit-text-fill-color: var(--wp--preset--color--accent-1) !important;
}

header .wp-block-navigation__responsive-container-open svg,
header .wp-block-navigation__responsive-container-close svg {
	fill: var(--wp--preset--color--contrast) !important;
}

header .nfd-commerce-icons svg,
header .wc-block-mini-cart__button svg,
header .wc-block-customer-account svg {
	color: var(--wp--preset--color--contrast) !important;
	fill: currentColor !important;
}

.hbfab-theme-toggle {
	cursor: pointer;
	border: 1px solid rgba(255, 255, 255, 0.85);
	background: rgba(0, 0, 0, 0.15);
	color: #fff;
	padding: 0.35rem 0.85rem;
	border-radius: 999px;
	font-size: 0.85rem;
	font-family: inherit;
}

.hbfab-theme-toggle:hover {
	background: rgba(0, 0, 0, 0.28);
}

.hbfab-site-logo img,
.custom-logo.hbfab-site-logo {
	max-height: 72px;
	width: auto;
}

/* WooCommerce buttons */
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.wc-block-components-button {
	background-color: var(--wp--preset--color--accent-2, #8dc63f) !important;
	color: #121416 !important;
	border-color: var(--wp--preset--color--accent-2, #8dc63f) !important;
}

.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover {
	background-color: var(--wp--preset--color--accent-1, #1b75bc) !important;
	color: #fff !important;
	border-color: var(--wp--preset--color--accent-1, #1b75bc) !important;
}

/* Variable product option picker — taller so full option text is readable */
.woocommerce div.product form.cart .variations select,
.woocommerce div.product form.cart table.variations select,
.variations_form select {
	min-height: 2.85rem;
	line-height: 1.4;
	padding: 0.55rem 2.25rem 0.55rem 0.75rem;
	font-size: 1rem;
	width: 100%;
	max-width: 32rem;
	color: var(--wp--preset--color--contrast, #f4f4f4);
	background-color: var(--wp--preset--color--base-midtone, #1a1f24);
	border: 1px solid var(--wp--preset--color--contrast-midtone, #5a6b7d);
	border-radius: 6px;
	-webkit-appearance: menulist;
	appearance: menulist;
}

html.hbfab-light .woocommerce div.product form.cart .variations select,
html.hbfab-light .variations_form select {
	color: #1b2838;
	background-color: #ffffff;
}

.woocommerce div.product form.cart .variations td.label label {
	font-weight: 600;
	margin-bottom: 0.35rem;
	display: inline-block;
}

/* Mobile header — stack search; tighten nav row */
@media (max-width: 782px) {
	.hbfab-top-bar {
		padding: 0.5rem 0.85rem;
	}

	.hbfab-header-search {
		order: 3;
		flex: 1 1 100%;
		max-width: none;
	}

	.hbfab-top-bar img.hbfab-logo {
		max-height: 48px;
	}

	header .wp-block-navigation {
		font-size: 0.95rem;
	}

	header .hbfab-nav-row {
		justify-content: space-between;
		min-height: 2.25rem;
	}

	header .hbfab-nav-social-cluster {
		margin-left: auto;
	}
}