/*
 * BFG visual + mobile fixes, 5 Dec 2026 (review of homepage, category, product pages).
 * Loaded last by inc/visual-fixes.php. Delete this file to undo.
 */

/* Product cards (homepage, shop, categories): the 16:9 gasket renders sat at the top of a
   4:3 grey box, leaving an empty grey strip under every image. Fill the box and centre the
   render on white instead. */
html .product-card__image-link {
	background: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
}
html .product-card__image-link .product-card__img {
	width: 100%;
	height: 100%;
	object-fit: contain;
}

/* Configurator products (Build Your Own Gasket, strip kits) show "Priced to your size" in
   lists instead of their $1/$3 placeholder price (Uni CPO _cpo_price_archives). */
html .bfg-price-note {
	font-size: 15px;
	font-weight: 600;
	line-height: 1.3;
	color: var(--color-text, #1E1A14);
}

/* Category headers (all product-category archives): the parent puts the category image
   (for brand pages, the OEM's own logo, e.g. a giant True® mark) behind the title under a
   blue tint. Mark, 5 Dec 2026: swap for the homepage's plain dark black-and-gold style.
   The inline background-image is overridden, so the logo isn't even downloaded; the
   category images are untouched and still used on the category cards. */
html .shop-hero {
	background: #1E1A14 !important;
	border-bottom: 3px solid #C8902A;
}
html .shop-hero::after {
	background: linear-gradient(135deg, #14120F 0%, #1E1A14 55%, #2A2218 100%);
}
html .shop-hero__desc a {
	color: #D8A441;
	text-decoration: underline;
	text-underline-offset: 2px;
}
html .shop-hero__desc a:hover {
	color: #fff;
}

@media (max-width: 767px) {
	/* Hero + "Build It" band: the nowrap CTA button sized the single grid column wider than
	   the phone (hero 6px, build band 10px over), clipping the text on the right. */
	html .hero__inner,
	html .build-cta__grid {
		grid-template-columns: minmax(0, 1fr);
	}
	html .hero__content,
	html .build-cta__content {
		min-width: 0;
		max-width: 100%;
	}
	html .hero__actions .btn,
	html .build-cta__actions .btn {
		white-space: normal;
		max-width: 100%;
		text-align: center;
		justify-content: center;
	}

	/* Homepage grids: two per row instead of one (page was ~14,100px tall on a phone). */
	/* parent woocommerce.css sets ul.products columns with !important */
	html .product-categories .category-cards,
	html .featured-products ul.products {
		grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
		gap: 12px !important;
	}
	html .product-categories .category-card__title,
	html .product-categories .category-cards h3 {
		font-size: 13px;
		line-height: 1.25;
		letter-spacing: 0;
		overflow-wrap: break-word;
		hyphens: auto;
	}
	html .product-categories .category-card__cta {
		font-size: 12px;
		letter-spacing: .02em;
	}

	/* Floating widgets. Google's "Store quality" badge sits in a fixed 400px x 68px box
	   (wider than the screen) across the bottom of the page and covers content; hide it on
	   phones (it stays on tablets/desktop). Zoho's "Hey there!" greeting covers product
	   titles: keep the chat button, drop the greeting. Hide chat while the menu is open so
	   it doesn't cover the menu's call button. Move back-to-top to the left so it doesn't
	   sit under the chat button. */
	#google-merchantwidget-iframe-wrapper {
		display: none !important;
	}
	.zsiq-float-tooltip,
	#zs-fl-tip {
		display: none !important;
	}
	body:has(.mobile-nav.is-open) .zsiq_theme1 {
		display: none !important;
	}
	html .back-to-top {
		right: auto;
		left: 16px;
	}
}
