/*
Theme Name: Bultń
Theme URI: https://www.bultnracing.nl
Description: Bultń child theme for Frost. Maroon + lumberjack plaid, Space Grotesk & Poppins.
Template: frost
Version: 1.0.0
Requires at least: 6.7
Requires PHP: 8.1
License: GNU General Public License v3 or later
License URI: https://www.gnu.org/licenses/gpl-3.0.html
Text Domain: bultn
*/

/* ---------------------------------------------------------------------------
   Plaid: the Wix site tiled a 32 KB JPEG. This is the same 50px buffalo check
   as a 2×2 SVG scaled up — a few hundred bytes, pixel-identical colours.
--------------------------------------------------------------------------- */
:root {
	--bultn-plaid: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='2' height='2' shape-rendering='crispEdges'%3E%3Crect width='2' height='2' fill='%23b41d26'/%3E%3Crect width='1' height='1' fill='%23500b10'/%3E%3Crect x='1' width='1' height='1' fill='%23790917'/%3E%3Crect y='1' width='1' height='1' fill='%237e1f27'/%3E%3C/svg%3E");
}

.is-style-plaid {
	background-color: #b41d26;
	background-image: var(--bultn-plaid);
	background-size: 100px 100px;
}

/* Text sitting directly on plaid needs a backing to stay readable. */
.is-style-plaid .bultn-panel,
.bultn-panel {
	background: rgb(80 10 16 / 0.88);
	padding: var(--wp--preset--spacing--medium);
}

/* Partner logos on /samenwerkingen/: uncropped on white tiles. */
.bultn-partners .wp-block-image a {
	display: flex;
	align-items: center;
	justify-content: center;
	aspect-ratio: 16 / 10;
	padding: 1.25rem;
	background: #fff;
	border-radius: 4px;
}

.bultn-partners .wp-block-image img {
	max-height: 100%;
	width: auto;
	object-fit: contain;
}

/* ---------------------------------------------------------------------------
   Header
--------------------------------------------------------------------------- */
.site-header,
.wp-site-blocks > header {
	position: sticky;
	top: 0;
	z-index: 50;
}

.admin-bar .site-header,
.admin-bar .wp-site-blocks > header {
	top: var(--wp-admin--admin-bar--height, 0);
}

.bultn-brand {
	gap: 0.75rem;
	text-decoration: none;
}

.bultn-brand img {
	display: block;
	width: 72px;
	height: auto;
}

.bultn-brand .wp-block-site-title a {
	text-decoration: none;
}

.site-header .wp-block-navigation a:where(:not(.wp-element-button)) {
	text-decoration: none;
	text-underline-offset: 0.35em;
}

.site-header .wp-block-navigation a:hover,
.site-header .wp-block-navigation .current-menu-item > a,
.site-header .wp-block-navigation [aria-current="page"] {
	text-decoration: underline;
	text-decoration-thickness: 2px;
}

.wp-block-navigation__responsive-container.is-menu-open {
	background-color: var(--wp--preset--color--base) !important;
	color: var(--wp--preset--color--contrast) !important;
}

/* ---------------------------------------------------------------------------
   Forms (contact form + WooCommerce checkout on dark background)
--------------------------------------------------------------------------- */
input:where([type="text"], [type="email"], [type="tel"], [type="number"], [type="password"], [type="search"]),
select,
textarea {
	width: 100%;
	padding: 0.7rem 0.85rem;
	font: inherit;
	color: var(--wp--preset--color--base);
	background: #fff;
	border: 1px solid transparent;
	border-radius: 4px;
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible,
a:focus-visible,
button:focus-visible {
	outline: 3px solid var(--wp--preset--color--primary);
	outline-offset: 2px;
}

.bultn-contact {
	max-width: 560px;
}

.bultn-contact label {
	display: block;
	margin-bottom: 0.35rem;
	font-weight: 600;
}

.bultn-contact__hp {
	position: absolute !important;
	left: -9999px;
}

.bultn-contact__notice {
	padding: 0.85rem 1rem;
	border-left: 4px solid var(--wp--preset--color--primary);
	background: var(--wp--preset--color--base-2);
}

.bultn-contact__notice.is-error {
	border-color: #ff6b6b;
}

/* ---------------------------------------------------------------------------
   WooCommerce
--------------------------------------------------------------------------- */
.bultn-levertijd {
	margin: 0 0 1rem;
	font-size: var(--wp--preset--font-size--small);
}

.bultn-levertijd__label {
	font-weight: 600;
	color: var(--wp--preset--color--primary);
}

/* Product cards: dark tile like the old site, readable on plaid too. */
.wp-block-woocommerce-product-template > li,
.wc-block-product {
	display: flex;
	flex-direction: column;
	background: var(--wp--preset--color--base-2);
	border-radius: 4px;
	overflow: hidden;
	padding-bottom: var(--wp--preset--spacing--x-small);
	transition: transform 0.15s ease;
}

.wp-block-woocommerce-product-template > li:hover,
.wc-block-product:hover {
	transform: translateY(-2px);
}

.wp-block-woocommerce-product-template > li > :not(.wc-block-components-product-image) {
	padding-inline: var(--wp--preset--spacing--x-small);
}

.wp-block-woocommerce-product-template .wp-block-post-title {
	margin-top: auto;
}

.wp-block-woocommerce-product-template .wp-block-post-title a {
	text-decoration: none;
}

.wp-block-woocommerce-product-template .wp-block-post-title a:hover {
	color: var(--wp--preset--color--primary);
}

.wc-block-components-product-image img {
	aspect-ratio: 1;
	object-fit: cover;
}

.wc-block-components-product-sale-badge,
.wc-block-components-product-badge {
	color: var(--wp--preset--color--base) !important;
	background: var(--wp--preset--color--primary) !important;
	border: 0 !important;
}

.wc-block-components-product-price del,
.price del {
	opacity: 0.65;
}

/* WooCommerce's `background:` shorthand on variation selects resets the colour to
   transparent, leaving maroon text on maroon. Restore the white field. */
.woocommerce div.product form.cart .variations select {
	background-color: #fff;
	color: var(--wp--preset--color--base);
	min-width: 100%;
	height: auto;
	margin-right: 0;
	line-height: 1.4;
}

.woocommerce div.product form.cart .variations th,
.woocommerce div.product form.cart .variations td {
	display: block;
	padding: 0 0 0.35rem;
}

.woocommerce div.product form.cart .reset_variations {
	color: var(--wp--preset--color--contrast-2);
}

/* Block checkout/cart use their own input styling; keep them on light fields. */
.wc-block-components-text-input input,
.wc-block-components-combobox .wc-block-components-combobox-control input,
.wc-blocks-components-select__select {
	color: var(--wp--preset--color--base) !important;
	background-color: #fff !important;
}

.wc-block-components-text-input label,
.wc-blocks-components-select__label {
	color: #5d4b4d !important;
}

.wc-block-components-notice-banner {
	color: var(--wp--preset--color--base);
}
