/* =============================================================================
 * ORPAT - Empty search / "no products found" state.
 *
 * Consumes the shared brand tokens declared in inc/orpat-premium.css (:root) and reuses the
 * component language already established in inc/orpat-pages.css (.opg-eyebrow, .opg-btn,
 * .opg-div card). No new palette, no new radius values.
 *
 *   colour   --o-ink --o-ink-2 --o-brass --o-brass-deep --o-brass-soft
 *            --o-ivory --o-cream --o-text --o-muted --o-line --o-white
 *   radius   --o-radius-sm (controls) --o-radius (panels) --o-radius-lg (cards)
 *            --o-radius-pill (buttons)          [the site-wide radius scale - no one-off values]
 *   depth    --o-shadow --o-shadow-sm
 *   motion   --o-ease
 *   type     --o-serif for display, the 'Jost' body stack from .opg-page for everything else
 *
 * Every var() carries a literal fallback so the panel survives the premium layer being dequeued.
 *
 * Scope: everything is under .orpat-nores (the template's own root), so it can never leak into
 * another template - and it stays correct when WoodMart re-renders the loop over AJAX, where no
 * body class can be added.
 *
 * Mobile-first. min-width media queries only, on the WoodMart breakpoints (768 / 1024).
 *
 * Rollback plan: delete this file and the enqueue in wp-content/mu-plugins/orpat-no-results.php.
 * ========================================================================== */

/* Neutralise WoodMart's own padding/background on the wrapper the template keeps for compatibility.
   Compound selector so it outranks the theme's single-class rule without !important. */
.woocommerce-no-products-found.orpat-nores-wrap {
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
	width: 100%;
}

.orpat-nores {
	--nores-max: 940px;
	width: 100%;
	font-family: 'Jost', 'Inter', -apple-system, 'Segoe UI', Roboto, sans-serif;
	color: var(--o-text, #2b2621);
	background: var(--o-cream, #fbf9f4);
	padding: clamp(32px, 7vw, 68px) 0 clamp(40px, 8vw, 84px);
}

.orpat-nores *,
.orpat-nores *::before,
.orpat-nores *::after {
	box-sizing: border-box;
}

.orpat-nores__inner {
	max-width: var(--nores-max);
	margin: 0 auto;
	padding: 0 clamp(18px, 5vw, 32px);
}

/* ---- Head ---------------------------------------------------------------- */
/* Same eyebrow construction as .opg-eyebrow in orpat-pages.css. */
.orpat-nores__eyebrow {
	display: inline-flex;
	align-items: center;
	gap: .7em;
	margin: 0 0 16px;
	font-size: .72rem;
	font-weight: 700;
	line-height: 1;
	letter-spacing: .24em;
	text-transform: uppercase;
	color: var(--o-brass-deep, #8f6c34);
}

.orpat-nores__eyebrow::before {
	content: "";
	width: 26px;
	height: 1px;
	background: var(--o-brass, #b0894e);
}

.orpat-nores__title {
	margin: 0 0 14px;
	font-family: var(--o-serif, 'Fraunces', Georgia, 'Times New Roman', serif);
	font-weight: 560;
	font-size: clamp(1.55rem, 5.4vw, 2.5rem);
	line-height: 1.15;
	letter-spacing: -.01em;
	color: var(--o-ink, #17130f);
	/* A pasted search term can be one long unbroken string - it must never widen the page at 320px. */
	overflow-wrap: anywhere;
	word-break: break-word;
}

.orpat-nores__term {
	font-style: italic;
	color: var(--o-brass-deep, #8f6c34);
}

.orpat-nores__lead {
	max-width: 60ch;
	margin: 0 0 clamp(24px, 4vw, 34px);
	font-size: clamp(.97rem, 2.6vw, 1.08rem);
	line-height: 1.7;
	color: var(--o-muted, #796f64);
}

/* ---- Retry search -------------------------------------------------------- */
.orpat-nores__form {
	display: flex;
	flex-direction: column;
	gap: 12px;
	max-width: 620px;
	margin: 0 0 clamp(34px, 6vw, 52px);
}

/* Control radius = --o-radius-sm, per the radius scale comment in orpat-premium.css. */
.orpat-nores__field {
	display: flex;
	align-items: center;
	min-width: 0;
	background: var(--o-white, #fff);
	border: 1px solid var(--o-line, #e8e0d2);
	border-radius: var(--o-radius-sm, 10px);
	box-shadow: var(--o-shadow-sm, 0 1px 2px rgba(23, 19, 15, .05), 0 4px 14px -8px rgba(23, 19, 15, .12));
	transition: border-color .25s var(--o-ease, cubic-bezier(.22, .61, .36, 1));
}

.orpat-nores__field > svg {
	flex: 0 0 auto;
	margin-left: 14px;
	color: var(--o-brass-deep, #8f6c34);
}

.orpat-nores__input {
	flex: 1 1 auto;
	min-width: 0;
	padding: 14px 14px 14px 10px;
	border: 0;
	background: transparent;
	font: inherit;
	font-size: 1rem; /* 16px: stops iOS Safari zooming the page on focus. */
	line-height: 1.4;
	color: var(--o-text, #2b2621);
}

.orpat-nores__input::placeholder {
	color: var(--o-muted, #796f64); /* 4.9:1 on white - AA even though a label is present. */
	opacity: 1;
}

/* The field, not the bare input, carries the focus indicator - a solid 2px brass-deep outline
   (4.0:1 against white, above the 3:1 AA non-text minimum). */
.orpat-nores__input:focus {
	outline: none;
}

.orpat-nores__field:focus-within {
	border-color: var(--o-brass-deep, #8f6c34);
	outline: 2px solid var(--o-brass-deep, #8f6c34);
	outline-offset: 2px;
}

/* Same pill button language as .opg-btn--solid in orpat-pages.css. Deliberately NOT given the
   `button` class, so the !important rules orpat-premium.css puts on .woocommerce button.button
   never apply here and this stays a plain, predictable control. */
.orpat-nores__submit {
	align-self: flex-start;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: .6em;
	padding: .9em 1.9em;
	border: 1px solid var(--o-ink, #17130f);
	border-radius: var(--o-radius-pill, 999px);
	background: var(--o-ink, #17130f);
	color: var(--o-white, #fff);
	font-family: inherit;
	font-size: .95rem;
	font-weight: 600;
	line-height: 1;
	letter-spacing: .01em;
	cursor: pointer;
	box-shadow: var(--o-shadow-sm, 0 1px 2px rgba(23, 19, 15, .05), 0 4px 14px -8px rgba(23, 19, 15, .12));
	transition:
		transform .35s var(--o-ease, cubic-bezier(.22, .61, .36, 1)),
		background .35s var(--o-ease, cubic-bezier(.22, .61, .36, 1)),
		border-color .35s var(--o-ease, cubic-bezier(.22, .61, .36, 1));
}

.orpat-nores__submit:hover,
.orpat-nores__submit:focus {
	background: var(--o-brass-deep, #8f6c34);
	border-color: var(--o-brass-deep, #8f6c34);
	color: var(--o-white, #fff);
}

.orpat-nores__submit:hover {
	transform: translateY(-2px);
}

/* ---- Suggestions --------------------------------------------------------- */
.orpat-nores__subhead {
	margin: 0 0 16px;
	font-family: var(--o-serif, 'Fraunces', Georgia, 'Times New Roman', serif);
	font-weight: 600;
	font-size: clamp(1.05rem, 3.2vw, 1.28rem);
	line-height: 1.25;
	color: var(--o-ink, #17130f);
}

.orpat-nores__tips {
	display: grid;
	gap: 10px;
	margin: 0 0 clamp(34px, 6vw, 52px);
	padding: 0;
	list-style: none;
}

/* Panel radius = --o-radius, on the ivory ground used by .opg-div .ic in orpat-pages.css. */
.orpat-nores__tip {
	display: flex;
	align-items: flex-start;
	gap: 13px;
	padding: 14px 16px;
	background: var(--o-ivory, #f6f2ea);
	border: 1px solid var(--o-line, #e8e0d2);
	border-radius: var(--o-radius, 14px);
	font-size: .93rem;
	line-height: 1.6;
	color: var(--o-text, #2b2621);
}

.orpat-nores__num {
	flex: 0 0 auto;
	font-family: var(--o-serif, 'Fraunces', Georgia, 'Times New Roman', serif);
	font-weight: 600;
	font-size: .95rem;
	line-height: 1.6;
	font-variant-numeric: tabular-nums;
	color: var(--o-brass-deep, #8f6c34);
}

.orpat-nores__tip-text {
	min-width: 0;
}

/* ---- Category recovery paths --------------------------------------------- */
.orpat-nores__cats {
	display: grid;
	gap: 12px;
	margin: 0 0 clamp(28px, 5vw, 40px);
	padding: 0;
	list-style: none;
}

/* Card radius = --o-radius-lg, matching .opg-div in orpat-pages.css exactly. */
.orpat-nores__cat {
	display: flex;
	align-items: center;
	gap: 14px;
	height: 100%;
	padding: 19px 22px;
	background: var(--o-white, #fff);
	border: 1px solid var(--o-line, #e8e0d2);
	border-radius: var(--o-radius-lg, 22px);
	box-shadow: var(--o-shadow-sm, 0 1px 2px rgba(23, 19, 15, .05), 0 4px 14px -8px rgba(23, 19, 15, .12));
	color: var(--o-text, #2b2621);
	text-decoration: none;
	transition:
		transform .4s var(--o-ease, cubic-bezier(.22, .61, .36, 1)),
		box-shadow .4s var(--o-ease, cubic-bezier(.22, .61, .36, 1)),
		border-color .4s var(--o-ease, cubic-bezier(.22, .61, .36, 1));
}

.orpat-nores__cat:hover,
.orpat-nores__cat:focus {
	color: var(--o-text, #2b2621);
	text-decoration: none;
	border-color: var(--o-brass-soft, #d8c39c);
}

.orpat-nores__cat:hover {
	transform: translateY(-4px);
	box-shadow: var(--o-shadow, 0 1px 2px rgba(23, 19, 15, .04), 0 10px 34px -12px rgba(23, 19, 15, .14));
}

.orpat-nores__cat-txt {
	min-width: 0;
}

.orpat-nores__cat-name {
	display: block;
	font-family: var(--o-serif, 'Fraunces', Georgia, 'Times New Roman', serif);
	font-weight: 600;
	font-size: 1.08rem;
	line-height: 1.2;
	color: var(--o-ink, #17130f);
}

.orpat-nores__cat-desc {
	display: block;
	margin-top: 5px;
	font-size: .85rem;
	line-height: 1.5;
	color: var(--o-muted, #796f64);
}

.orpat-nores__cat-go {
	flex: 0 0 auto;
	margin-left: auto;
	display: grid;
	place-items: center;
	width: 26px;
	height: 26px;
	border-radius: var(--o-radius-pill, 999px);
	color: var(--o-brass-deep, #8f6c34);
	transition: transform .4s var(--o-ease, cubic-bezier(.22, .61, .36, 1));
}

.orpat-nores__cat:hover .orpat-nores__cat-go {
	transform: translateX(3px);
}

/* ---- Full catalogue (ghost button, same as .opg-btn--ghost) --------------- */
.orpat-nores__all {
	margin: 0;
}

.orpat-nores__ghost {
	display: inline-flex;
	align-items: center;
	gap: .6em;
	padding: .85em 1.8em;
	border: 1px solid rgba(23, 19, 15, .28);
	border-radius: var(--o-radius-pill, 999px);
	background: transparent;
	color: var(--o-ink, #17130f);
	font-size: .95rem;
	font-weight: 600;
	line-height: 1;
	text-decoration: none;
	transition:
		transform .35s var(--o-ease, cubic-bezier(.22, .61, .36, 1)),
		border-color .35s var(--o-ease, cubic-bezier(.22, .61, .36, 1));
}

.orpat-nores__ghost:hover,
.orpat-nores__ghost:focus {
	color: var(--o-ink, #17130f);
	text-decoration: none;
	border-color: var(--o-ink, #17130f);
}

.orpat-nores__ghost:hover {
	transform: translateY(-2px);
}

/* ---- Focus, a11y --------------------------------------------------------- */
.orpat-nores a:focus-visible,
.orpat-nores button:focus-visible {
	outline: 2px solid var(--o-brass-deep, #8f6c34);
	outline-offset: 3px;
}

.orpat-nores__sr {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

@media (prefers-reduced-motion: reduce) {
	.orpat-nores__field,
	.orpat-nores__submit,
	.orpat-nores__cat,
	.orpat-nores__cat-go,
	.orpat-nores__ghost {
		transition: none;
	}

	.orpat-nores__submit:hover,
	.orpat-nores__ghost:hover,
	.orpat-nores__cat:hover {
		transform: none;
	}

	.orpat-nores__cat:hover .orpat-nores__cat-go {
		transform: none;
	}
}

/* ---- Tablet: 768px and up (WoodMart tablet breakpoint) ------------------- */
@media (min-width: 768px) {
	.orpat-nores__form {
		flex-direction: row;
		align-items: stretch;
	}

	.orpat-nores__field {
		flex: 1 1 auto;
	}

	.orpat-nores__submit {
		align-self: auto;
		white-space: nowrap;
	}

	/* Tips stay one column here on purpose: at tablet width the content column leaves roughly
	   225px per third, which breaks these sentences into seven-line slivers. */
	.orpat-nores__cats {
		grid-template-columns: repeat(2, 1fr);
	}
}

/* ---- Desktop: 1024px and up --------------------------------------------- */
@media (min-width: 1024px) {
	.orpat-nores__tips {
		grid-template-columns: repeat(3, 1fr);
	}

	.orpat-nores__cats {
		grid-template-columns: repeat(3, 1fr);
	}
}

/* =============================================================================
 * Demo-banner net.
 *
 * Server-side suppression in wp-content/mu-plugins/orpat-no-results.php already stops the WOODMART
 * Banner widgets and the Elementor wd_banner / wd_image_or_svg widgets. This is the last resort for
 * anything that reaches the page by a third route (a shortcode inside an HTML block, a hard-coded
 * demo image).
 *
 * !important is REQUIRED here and is the only use of it in this file: the leftover WoodMart demo
 * banners carry Elementor `style="..."` inline declarations, and an inline style can only be beaten
 * with !important. Documented per project rule.
 *
 * Asset provenance (checked 2026-09-03): none of wd-furniture-background.jpg,
 * wd-furniture-pt-def.jpg or wd-furniture-contact-expert.png appears in ANY file under
 * wp-content. They are stored in the database (WoodMart theme options + widget instances),
 * which is why no template edit can remove them - only output suppression can.
 * wd-furniture-pt-def.jpg is WoodMart's "page title default" image, and on this view it is
 * ALREADY replaced by the brand band orpat-premium.css paints over
 * .woocommerce.archive .wd-page-title - a product search sets is_post_type_archive(product),
 * so the body carries the woocommerce + archive classes and that existing rule applies.
 *
 * Scope: body.orpat-no-results-search, i.e. a product SEARCH that returned zero results, inside the
 * content column only. Category archives are excluded on purpose - their page-title banner is itself
 * a wd_banner widget and must keep rendering. Every other page is untouched.
 * ========================================================================== */
body.orpat-no-results-search .site-content .promo-banner,
body.orpat-no-results-search .site-content .wrapper-content-banner,
body.orpat-no-results-search .site-content .wd-promo-banner-link,
body.orpat-no-results-search .site-content .elementor-widget-wd_banner,
body.orpat-no-results-search .site-content .elementor-widget-wd_banner_carousel,
body.orpat-no-results-search .site-content .elementor-widget-wd_image_or_svg,
body.orpat-no-results-search [class*="sidebar"] .promo-banner,
body.orpat-no-results-search [class*="sidebar"] .elementor-widget-wd_banner,
body.orpat-no-results-search img[src*="wd-furniture"] {
	display: none !important;
}
