/**
 * priusbearings.com visual polish pass 5 (2026-12-03)
 * Product-detail and category inquiry form placement.
 * Do not regress: homepage Request a Quote CTA (pass 4), sticky header,
 * legal-name footer, HARMONIC label, Life Sciences, hero slogan, or
 * first-screen title + product image visibility.
 */

/* ------------------------------------------------------------------
 * 1) Product singles: hide leftover blog meta ("Categorized as",
 *    published date, byline). Category data is unchanged in WP.
 * ------------------------------------------------------------------ */
body.single-post .entry-footer,
body.single .entry-footer,
body.single-post .posted-by,
body.single .posted-by,
body.single-post .post-taxonomies,
body.single .post-taxonomies,
body.single-post .cat-links,
body.single .cat-links,
body.single-post .author-bio,
body.single .author-bio {
	display: none !important;
}

/* Keep the product title visible (global custom CSS hides h1.entry-title). */
body.single-post h1.entry-title,
body.single h1.entry-title {
	display: block !important;
	visibility: visible !important;
}

/* ------------------------------------------------------------------
 * 2) Product singles: content-width quote card, tight under the copy.
 *    Desktop: title + image + intro on the left, form beside that block
 *    so the form starts on the first screen without covering the image.
 *    Previous / Next stays below the layout wrapper (in the template).
 * ------------------------------------------------------------------ */
body.single-post .product-detail-layout,
body.single .product-detail-layout {
	max-width: 1140px;
	margin: 8px auto 8px auto;
	padding: 0 24px 8px 24px;
	box-sizing: border-box;
}

body.single-post .product-inquiry,
body.single .product-inquiry {
	max-width: 100%;
	margin: 16px 0 8px 0;
	padding: 22px 24px 20px 24px;
	background: #fff;
	border: 1px solid var(--prius-line, #e6e9ee);
	border-radius: 6px;
	border-top: 1px solid var(--prius-line, #e6e9ee);
	box-sizing: border-box;
}

body.single-post .product-inquiry h2,
body.single .product-inquiry h2 {
	margin: 0 0 14px 0;
	font-size: 24px;
	line-height: 1.25;
	color: var(--prius-ink, #1a1a1a);
	font-weight: 700;
}

body.single-post .product-inquiry .wpcf7-form p,
body.single .product-inquiry .wpcf7-form p {
	margin: 0 0 10px 0;
}

body.single-post .product-inquiry textarea,
body.single .product-inquiry textarea {
	min-height: 0;
	height: 7.5em;
	resize: vertical;
}

body.single-post .post-navigation,
body.single .post-navigation,
.singular .post-navigation {
	max-width: 1140px;
	margin: 8px auto 0 auto;
	padding: 16px 24px 28px 24px;
	box-sizing: border-box;
}

/* Keep the right-hand WhatsApp / email dock off the form and nav on desktop.
   Product singles have no .site-main wrapper, so pass 1's padding-right on
   .site-main does not apply here. */
@media (min-width: 768px) {
	body.single-post .product-detail-layout,
	body.single .product-detail-layout,
	body.single-post .post-navigation,
	body.single .post-navigation,
	.singular .post-navigation,
	body.category .bottom-section.category-inquiry-section,
	body.archive.category .bottom-section.category-inquiry-section {
		width: calc(100% - 96px);
		max-width: 1140px;
		margin-left: auto;
		margin-right: auto;
		box-sizing: border-box;
	}

	body.single-post .product-inquiry,
	body.single .product-inquiry {
		padding-right: 22px;
	}
}

@media (min-width: 992px) {
	body.single-post .product-detail-layout,
	body.single .product-detail-layout {
		display: grid;
		grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
		column-gap: 36px;
		align-items: start;
		padding: 0 24px 16px 24px;
	}

	body.single-post .product-detail-layout > article,
	body.single .product-detail-layout > article {
		grid-column: 1;
		min-width: 0;
	}

	body.single-post .product-detail-layout > .product-inquiry,
	body.single .product-detail-layout > .product-inquiry {
		grid-column: 2;
		grid-row: 1;
		align-self: start;
		margin: 8px 0 0 0;
		padding: 20px 22px 16px 22px;
		background: var(--prius-paper, #f5f7fa);
		border: 1px solid var(--prius-line, #e6e9ee);
		border-radius: 6px;
	}

	/* Let the product block fill its column; do not cover the image. */
	body.single-post .product-detail-layout .entry-header,
	body.single .product-detail-layout .entry-header,
	body.single-post .product-detail-layout .entry-content,
	body.single .product-detail-layout .entry-content {
		max-width: none !important;
		width: 100%;
		margin-left: 0 !important;
		margin-right: 0 !important;
		padding-left: 0 !important;
		padding-right: 0 !important;
	}

	body.single-post .product-detail-layout .post-thumbnail,
	body.single .product-detail-layout .post-thumbnail {
		max-width: 100%;
		margin: 0 auto 12px auto !important;
	}

	body.single-post .product-detail-layout .post-thumbnail img,
	body.single .product-detail-layout .post-thumbnail img {
		max-width: 100% !important;
		height: auto !important;
		/* Keep the existing first-screen cap so the image stays in view. */
		max-height: 46vh !important;
		object-fit: contain !important;
	}
}

/* Mobile / tablet: form stacks immediately under the description. */
@media (max-width: 991px) {
	body.single-post .product-detail-layout,
	body.single .product-detail-layout {
		display: block;
		padding: 0 16px 16px 16px;
	}

	body.single-post .product-inquiry,
	body.single .product-inquiry {
		margin: 12px 0 8px 0;
		padding: 18px 16px 28px 16px;
	}

	body.single-post .entry-content,
	body.single .entry-content,
	body.single-post .product-inquiry,
	body.single .product-inquiry {
		padding-right: 64px;
		box-sizing: border-box;
	}

	body.single-post .post-navigation,
	body.single .post-navigation {
		padding: 12px 16px 88px 16px;
		padding-right: 64px;
	}
}

/* Cookie bar should not cover Submit on product or category inquiry. */
html body:has(.cky-consent-container:not(.cky-hide)) .product-inquiry,
html body:has(.cky-consent-container:not(.cky-hide)) .category-inquiry-section {
	padding-bottom: 28px;
	margin-bottom: 16px;
	scroll-margin-bottom: 140px;
}

@media (max-width: 767px) {
	html body:has(.cky-consent-container:not(.cky-hide)) .product-inquiry,
	html body:has(.cky-consent-container:not(.cky-hide)) .category-inquiry-section {
		padding-bottom: 36px;
		margin-bottom: 24px;
		scroll-margin-bottom: 200px;
	}
}

/* ------------------------------------------------------------------
 * 3) Category pages: one inquiry form at the bottom, as a content-width
 *    card close to the intro / catalog button. Do not change "Inquire Now".
 * ------------------------------------------------------------------ */
body.category .asset-download-section {
	margin-top: 8px !important;
	margin-bottom: 16px !important;
}

body.category .bottom-section.category-inquiry-section,
body.archive.category .bottom-section.category-inquiry-section {
	display: block;
	width: 100%;
	max-width: 1140px;
	margin: 8px auto 28px auto;
	padding: 0 24px 16px 24px;
	gap: 0;
	align-items: stretch;
	justify-content: flex-start;
	box-sizing: border-box;
}

body.category .category-inquiry-section .inquiry_form,
body.archive.category .category-inquiry-section .inquiry_form {
	display: block;
	width: 100%;
	max-width: 100%;
	margin: 0;
	padding: 22px 28px 24px 28px;
	background: var(--prius-paper, #f5f7fa);
	border: 1px solid var(--prius-line, #e6e9ee);
	border-radius: 6px;
	box-sizing: border-box;
	clear: both;
}

body.category .category-inquiry-section .inquiry_form h2,
body.archive.category .category-inquiry-section .inquiry_form h2 {
	margin: 0 0 14px 0;
	font-size: 24px;
	line-height: 1.25;
	font-weight: 700;
	color: var(--prius-ink, #1a1a1a);
	text-align: left;
}

body.category .category-inquiry-section .wpcf7,
body.category .category-inquiry-section .wpcf7-form {
	width: 100%;
	max-width: 100%;
}

body.category .category-inquiry-section .wpcf7-form input[type="text"],
body.category .category-inquiry-section .wpcf7-form input[type="email"],
body.category .category-inquiry-section .wpcf7-form input[type="tel"],
body.category .category-inquiry-section .wpcf7-form textarea {
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
}

body.category .category-inquiry-section .wpcf7-form textarea {
	min-height: 0;
	height: 7.5em;
	resize: vertical;
}

@media (max-width: 991px) {
	body.category .bottom-section.category-inquiry-section,
	body.archive.category .bottom-section.category-inquiry-section {
		padding: 0 16px 24px 16px;
	}

	body.category .category-inquiry-section .inquiry_form,
	body.archive.category .category-inquiry-section .inquiry_form {
		padding: 18px 16px 28px 16px;
		padding-right: 64px;
	}
}
