:root {
	--rch-bar-height: 70px;

	--rch-bg-panel: var(--color-light);
	--rch-bg-page: var(--color-cream);
	--rch-border-soft: rgba(90, 52, 43, 0.14);
	--rch-border-strong: rgba(90, 52, 43, 0.10);
	--rch-text-main: var(--color-brown);
	--rch-text-secondary: rgba(90, 52, 43, 0.78);
	--rch-text-muted: rgba(90, 52, 43, 0.55);
	--rch-card-bg: var(--color-cream);
}

/* ================= SEARCH BASE ================= */

.site-header {
	position: sticky;
	top: 0;
	z-index: 100000;
	overflow: visible !important;
}

body.rch-search-open .site-header {
	box-shadow: none !important;
}

.rch-custom-search {
	position: absolute;
	top: 100%;
	left: 0;
	width: 100%;
	font-family: var(--font-body);
	color: var(--rch-text-main);
	z-index: 100001;
}

.rch-custom-search * {
	box-sizing: border-box;
}

/* ================= OVERLAY ================= */

.rch-custom-overlay {
	position: absolute;
	top: 0;
	left: 50%;
	width: 100vw;
	height: 100vh;
	background: rgba(255, 255, 255, 0.28);
	backdrop-filter: blur(3px);
	-webkit-backdrop-filter: blur(3px);
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transform: translateX(-50%);
	transition: opacity 0.22s ease, visibility 0.22s ease;
	z-index: 1;
}

.rch-custom-search.is-open .rch-custom-overlay,
.rch-custom-search[data-open="true"] .rch-custom-overlay {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
}

/* ================= PANEL ================= */

.rch-custom-panel {
	position: absolute;
	top: 0;
	left: 50%;
	width: 100vw;
	max-height: calc(100vh - var(--rch-bar-height));
	overflow-y: auto;
	background: var(--rch-bg-panel);
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transform: translateX(-50%) translateY(-6px);
	transition:
		opacity 0.22s ease,
		visibility 0.22s ease,
		transform 0.22s ease;
	z-index: 2;
	border: 0 !important;
	border-top: 1px solid rgba(90, 52, 43, 0.08) !important;
	border-bottom: 1px solid rgba(90, 52, 43, 0.06) !important;
	box-shadow: 0 14px 34px rgba(43, 28, 22, 0.045);
}

.rch-custom-search.is-open .rch-custom-panel,
.rch-custom-search[data-open="true"] .rch-custom-panel {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
	transform: translateX(-50%) translateY(0);
}

/* ================= INNER ================= */

.rch-custom-inner {
	width: min(100% - 96px, 1440px);
	margin: 0 auto;
	padding: 0 0 26px;
	background: var(--rch-bg-panel);
}

.rch-custom-search:not(.has-query) .rch-custom-results,
.rch-custom-search:not(.has-query) .rch-custom-status,
.rch-custom-search:not(.has-query) .rch-custom-empty-state {
	display: none;
}

/* ================= SEARCH BAR ================= */

.rch-custom-bar {
	position: relative;
	display: flex;
	align-items: center;
	width: 100%;
	height: var(--rch-bar-height);
	gap: 12px;
	border: 0;
	border-bottom: 1px solid rgba(90, 52, 43, 0.11) !important;
	background: var(--rch-bg-panel);
	box-shadow: none !important;
}

.rch-custom-bar:hover,
.rch-custom-bar:active,
.rch-custom-bar:focus,
.rch-custom-bar:focus-within,
.rch-custom-bar * {
	box-shadow: none !important;
}

.rch-custom-bar:focus-within {
	outline: none !important;
	border-bottom-color: rgba(90, 52, 43, 0.10) !important;
}

/* ================= ICON SEARCH ================= */

.rch-custom-bar-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 28px;
	width: 28px;
	height: 28px;
	color: var(--color-brown);
}

.rch-custom-bar-icon-shape {
	display: block;
	width: 22px;
	height: 22px;
	background-color: rgba(90, 52, 43, 0.66);
	opacity: 1;
	mask-image: url("../images/icon-search.svg");
	mask-repeat: no-repeat;
	mask-position: center;
	mask-size: contain;
	-webkit-mask-image: url("../images/icon-search.svg");
	-webkit-mask-repeat: no-repeat;
	-webkit-mask-position: center;
	-webkit-mask-size: contain;
}

/* ================= INPUT ================= */

.rch-custom-input {
	-webkit-appearance: none;
	-moz-appearance: none;
	appearance: none;
	display: block;
	flex: 1 1 auto;
	width: auto;
	min-width: 0;
	height: auto;
	margin: 0;
	padding: 2px 0 0;
	border: none !important;
	outline: none !important;
	box-shadow: none !important;
	background: transparent;
	color: var(--color-brown);
	font-family: var(--font-title);
	font-size: clamp(18px, 1.35vw, 22px);
	font-weight: 400;
	letter-spacing: -0.008em;
	line-height: 1.15;
}

.rch-custom-input::placeholder {
	color: rgba(90, 52, 43, 0.56);
	opacity: 1;
	font-family: var(--font-title);
}

.rch-custom-input::-webkit-search-decoration,
.rch-custom-input::-webkit-search-cancel-button,
.rch-custom-input::-webkit-search-results-button,
.rch-custom-input::-webkit-search-results-decoration {
	-webkit-appearance: none;
	appearance: none;
	display: none;
}

.rch-custom-input:focus,
.rch-custom-input:focus-visible,
.rch-custom-input:active {
	outline: none !important;
	box-shadow: none !important;
	border: none !important;
	background: transparent;
}

.rch-custom-input:-webkit-autofill,
.rch-custom-input:-webkit-autofill:hover,
.rch-custom-input:-webkit-autofill:focus,
.rch-custom-input:-webkit-autofill:active {
	background-color: var(--rch-bg-panel) !important;
	-webkit-text-fill-color: var(--rch-text-main) !important;
	-webkit-box-shadow: 0 0 0 1000px var(--rch-bg-panel) inset !important;
	box-shadow: 0 0 0 1000px var(--rch-bg-panel) inset !important;
	caret-color: var(--rch-text-main);
	transition: background-color 9999s ease-out 0s;
}

.rch-custom-input:autofill {
	background-color: var(--rch-bg-panel);
	color: var(--rch-text-main);
	caret-color: var(--rch-text-main);
}

/* ================= CLOSE BUTTON ================= */

.rch-custom-close {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 28px;
	width: 28px;
	height: 28px;
	margin-left: auto;
	padding: 0;
	border: none;
	background: transparent;
	cursor: pointer;
	color: var(--color-brown);
	opacity: 1;
	transition: opacity 0.18s ease, transform 0.18s ease;
}

.rch-custom-close:hover {
	background: transparent;
	transform: rotate(90deg);
	opacity: 0.72;
}

.rch-custom-close-icon {
	position: relative;
	display: block;
	width: 13px;
	height: 13px;
}

.rch-custom-close-icon::before,
.rch-custom-close-icon::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 13px;
	height: 1.4px;
	background: rgba(90, 52, 43, 0.58);
	border-radius: 999px;
	transform-origin: center;
}

.rch-custom-close-icon::before {
	transform: translate(-50%, -50%) rotate(45deg);
}

.rch-custom-close-icon::after {
	transform: translate(-50%, -50%) rotate(-45deg);
}

/* ================= STATUS / LOADER ================= */

.rch-custom-status {
	margin-top: 10px;
	min-height: 18px;
	color: var(--rch-text-muted);
	font-size: var(--fs-sm);
	background: var(--rch-bg-panel);
}

.rch-custom-status:empty {
	display: none;
}

.rch-loader {
	display: inline-block;
	width: var(--umatatea-loader-size-small);
	height: var(--umatatea-loader-size-small);
	margin-right: 8px;
	vertical-align: middle;
	border: var(--umatatea-loader-border-width) solid var(--umatatea-loader-track);
	border-top-color: var(--umatatea-loader-color);
	border-radius: 50%;
	background: transparent;
	box-shadow: none;
	animation: umatatea-loader-spin var(--umatatea-loader-speed) linear infinite;
}

/* ================= RESULTS LAYOUT ================= */

.rch-custom-results {
  display: grid;
  grid-template-columns: 300px 1fr;
  column-gap: 60px;
  padding-top: 30px;
  padding-bottom: 34px;
  background: var(--rch-bg-panel);
}

.rch-custom-categories-col {
	min-height: 360px;
	padding-right: 34px;
	border-right: 1px solid var(--rch-border-soft);
}

.rch-custom-products-col {
	min-width: 0;
}

.rch-custom-products-heading {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 22px;
	margin: 0 0 18px;
}

.rch-custom-products-heading .rch-custom-heading {
	margin-bottom: 0;
}

.rch-custom-heading {
	margin: 0 0 22px;
	color: var(--rch-text-main);
	font-family: var(--font-title);
	font-size: 21px;
	font-weight: var(--fw-semibold);
	line-height: 1.12;
}

/* ================= CATEGORIES ================= */

.rch-custom-categories-list {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 0;
}

.rch-custom-category-item {
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: 9px;
	padding: 8px 0;
	color: var(--rch-text-secondary);
	font-size: 14px;
	font-weight: 400;
	line-height: 1.35;
	text-decoration: none !important;
	box-shadow: none !important;
	border-bottom: 0 !important;
	transition: opacity 0.18s ease, color 0.18s ease;
}

.rch-custom-category-item:hover {
	opacity: 0.8;
	color: var(--rch-text-main);
}

.rch-custom-category-name {
	display: inline;
	text-decoration: none !important;
}

.rch-custom-category-count {
	display: none;
}

/* ================= ARROWS ================= */

.rch-custom-arrow {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: flex-start;
	width: 18px;
	height: 14px;
	flex: 0 0 18px;
	text-decoration: none !important;
}

.rch-custom-arrow-line {
	position: relative;
	display: block;
	width: 14px;
	height: 1.5px;
	background: currentColor;
	border-radius: 999px;
}

.rch-custom-arrow-line::after {
	content: "";
	position: absolute;
	right: -1px;
	top: 50%;
	width: 6px;
	height: 6px;
	border-top: 1.5px solid currentColor;
	border-right: 1.5px solid currentColor;
	transform: translateY(-50%) rotate(45deg);
	border-radius: 0.5px;
}

.rch-custom-see-all .rch-custom-arrow,
.rch-custom-category-item .rch-custom-arrow {
	transform: translateY(1px);
}

/* ================= PRODUCTS ================= */

.rch-custom-products-grid {
	display: grid;
	grid-template-columns: repeat(4, 200px);
	gap: 22px;
	align-items: start;
	justify-content: start;
}


.rch-custom-product-card {
	display: block;
	width: 200px;
	color: inherit;
	text-decoration: none !important;
	box-shadow: none !important;
	border-bottom: 0 !important;
}

.rch-custom-product-card:hover {
	opacity: 1;
}

.rch-custom-product-card,
.rch-custom-product-card:hover,
.rch-custom-product-card:focus,
.rch-custom-product-card:active,
.rch-custom-product-card *,
.rch-custom-product-card *:hover,
.rch-custom-product-card *:focus {
	text-decoration: none !important;
	box-shadow: none !important;
	border-bottom: 0 !important;
	outline: none !important;
}

.rch-custom-product-image-wrap {
	position: relative;
	width: 200px;
	height: 200px;
	margin-bottom: 12px;
	overflow: hidden;
	border-radius: 2px;
	background: var(--rch-card-bg);
}

.rch-custom-product-image {
	position: absolute;
	top: 50%;
	left: 50%;
	display: block;
	width: 100%;
	max-width: none;
	height: 100%;
	object-fit: contain;
	transform:
		translate(
			calc(-50% + var(--catalog-crop-offset-x, 0px)),
			calc(-50% + var(--catalog-crop-offset-y, 0px))
		);
	transform-origin: center center;
	transition: transform 0.26s ease, opacity 0.26s ease;
}

.rch-custom-product-card:hover .rch-custom-product-image {
	transform:
		translate(
			calc(-50% + var(--catalog-crop-offset-x, 0px)),
			calc(-50% + var(--catalog-crop-offset-y, 0px))
		)
		scale(1.03);
}

.rch-custom-product-image[data-product-image-derived="1"] {
	position: absolute !important;
	inset: 0 !important;
	top: 0 !important;
	right: 0 !important;
	bottom: 0 !important;
	left: 0 !important;
	width: 100% !important;
	height: 100% !important;
	max-width: none !important;
	object-fit: cover !important;
	object-position: center !important;
	transform: none !important;
	margin: 0 !important;
	padding: 0 !important;
}

.rch-custom-product-content {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	text-align: center;
}

.rch-custom-product-title {
	max-width: 100%;
	color: var(--rch-text-main);
	font-size: 14px;
	font-weight: 700;
	line-height: 1.22;
	word-break: break-word;
	text-decoration: none !important;
}

.rch-custom-product-price {
	color: var(--rch-text-secondary);
	font-size: 12.5px;
	font-weight: 500;
	line-height: 1.25;
	text-align: center;
	text-decoration: none !important;
	border-bottom: 0 !important;
	box-shadow: none !important;
}

.rch-custom-product-price .amount {
	font-weight: 500;
}

/* ================= SEE ALL ================= */

.rch-custom-see-all-wrap {
	display: flex;
	justify-content: flex-end;
}

.rch-custom-see-all {
	position: relative;
	display: inline-flex;
	align-items: center;
	flex: 0 0 auto;
	gap: 8px;
	padding: 0;
	color: rgba(90, 52, 43, 0.70);
	font-size: 11px;
	font-weight: 800;
	line-height: 1;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	text-decoration: none !important;
	border-bottom: 0 !important;
	box-shadow: none !important;
	transition: opacity 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.rch-custom-see-all-label {
	text-decoration: none !important;
}

.rch-custom-see-all:hover {
	opacity: 0.82;
	color: var(--rch-text-main);
	border-color: transparent;
}

@media (min-width: 1025px) {
	:root {
		--rch-bar-height: 64px;
	}

	.rch-custom-inner {
		padding-bottom: 18px;
	}

	.rch-custom-results {
		padding-top: 22px;
		padding-bottom: 24px;
	}

	.rch-custom-heading {
		margin-bottom: 18px;
	}

	.rch-custom-products-heading .rch-custom-heading {
		margin-bottom: 0;
	}

	.rch-custom-products-grid {
		gap: 18px;
	}

	.rch-custom-product-image-wrap {
		margin-bottom: 10px;
	}

	.rch-custom-product-content {
		gap: 5px;
	}

	.rch-custom-see-all-wrap {
		margin-top: 0;
	}
}

/* ================= EMPTY STATES ================= */

.rch-custom-no-results {
	display: flex;
	align-items: center;
	min-height: 48px;
	max-width: 420px;
	color: rgba(90, 52, 43, 0.62);
	font-family: var(--font-body);
	font-size: var(--fs-base);
	font-weight: var(--fw-regular);
	line-height: 1.55;
}

.rch-custom-empty-state {
	width: min(100%, 520px);
	margin-top: 30px;
	padding: 18px 22px;
	background: var(--color-cream);
	border-left: 3px solid var(--color-accent);
	color: rgba(90, 52, 43, 0.72);
	font-family: var(--font-body);
	font-size: var(--fs-base);
	font-weight: var(--fw-regular);
	line-height: 1.55;
	text-align: left;
}

.rch-custom-empty-state:empty {
	display: none;
}

/* ================= SEARCH RESULTS PAGE EMPTY ================= */

.umatatea-search-empty {
	max-width: 620px;
	margin: 96px auto 120px;
	padding: 0 24px;
	color: var(--color-brown);
	text-align: center;
}

.umatatea-search-empty__eyebrow {
	margin: 0 0 14px;
	color: var(--color-accent);
	font-family: var(--font-body);
	font-size: 11px;
	font-weight: 800;
	line-height: 1.2;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}

.umatatea-search-empty__title {
	margin: 0 auto 18px;
	color: var(--color-brown);
	font-family: var(--font-title);
	font-size: 34px;
	font-weight: 500;
	line-height: 1.08;
}

.umatatea-search-empty__text {
	max-width: 460px;
	margin: 0 auto 30px;
	color: rgba(90, 52, 43, 0.72);
	font-family: var(--font-body);
	font-size: 14px;
	line-height: 1.65;
}

.umatatea-search-empty__button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 48px;
	padding: 0 26px;
	border-radius: 4px;
	background: var(--color-brown);
	color: #fffdfb;
	font-family: var(--font-body);
	font-size: 12px;
	font-weight: 800;
	line-height: 1;
	letter-spacing: 0.12em;
	text-decoration: none !important;
	text-transform: uppercase;
}

.umatatea-search-empty__button:hover {
	background: #4a2418;
	color: #fffdfb;
}

/* ================= SEARCH — RESPONSIVE MOBILE ================= */

@media (max-width: 1600px) {
	.rch-custom-inner {
		width: min(100% - 80px, 1440px);
	}
}

@media (max-width: 1280px) {
	.rch-custom-inner {
		width: min(100% - 48px, 1440px);
	}

	.rch-custom-results {
		grid-template-columns: 260px 1fr;
		column-gap: 34px;
	}

	.rch-custom-products-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.rch-custom-product-card,
	.rch-custom-product-image-wrap {
		width: 100%;
	}

	.rch-custom-product-image-wrap {
		height: auto;
		aspect-ratio: 1 / 1;
	}
}

@media (max-width: 1024px) {
	.rch-custom-inner {
		width: min(100% - 48px, 1440px);
	}

	.rch-custom-bar {
		height: 74px;
		gap: 10px;
	}

	.rch-custom-bar-icon {
		flex-basis: 26px;
		width: 26px;
		height: 26px;
	}

	.rch-custom-bar-icon-shape {
		width: 20px;
		height: 20px;
	}

	.rch-custom-input {
		font-size: clamp(19px, 2.8vw, 23px);
	}

	.rch-custom-close {
		flex-basis: 28px;
		width: 28px;
		height: 28px;
	}

	.rch-custom-results {
		grid-template-columns: 1fr;
		row-gap: 28px;
	}

	.rch-custom-categories-col {
		min-height: auto;
		padding-right: 0;
		padding-bottom: 20px;
		border-right: none;
		border-bottom: 1px solid var(--rch-border-soft);
	}

	.rch-custom-products-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.rch-custom-product-card,
	.rch-custom-product-image-wrap {
		width: 100%;
	}
}

@media (max-width: 767px) {
	:root {
		--rch-bar-height: 64px;
	}

	.rch-custom-inner {
		width: min(100% - 32px, 1440px);
		padding-bottom: 24px;
	}

	.rch-custom-bar {
		height: var(--rch-bar-height);
		gap: 9px;
	}

	.rch-custom-bar-icon {
		flex-basis: 24px;
		width: 24px;
		height: 24px;
	}

	.rch-custom-bar-icon-shape {
		width: 18px;
		height: 18px;
	}

	.rch-custom-input {
		font-size: 19px;
		line-height: 1.2;
	}

	.rch-custom-close {
		flex-basis: 26px;
		width: 26px;
		height: 26px;
	}

	.rch-custom-heading {
		margin-bottom: 18px;
		font-size: 20px;
	}

	.rch-custom-category-item {
		font-size: var(--fs-md);
	}

	.rch-custom-products-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 16px;
	}

	.rch-custom-product-title {
		font-size: var(--fs-base);
	}

	.rch-custom-product-price {
		font-size: var(--fs-sm);
	}

	.rch-custom-no-results,
	.rch-custom-empty-state {
		font-size: var(--fs-sm);
	}
}

@media (max-width: 560px) {
  :root {
    --rch-bar-height: 58px;
  }

  .rch-custom-inner {
    width: min(100% - 28px, 1440px);
    padding-bottom: 18px;
  }

  .rch-custom-bar {
    height: var(--rch-bar-height);
    gap: 8px;
  }

  .rch-custom-bar-icon {
    flex: 0 0 22px;
    width: 22px;
    height: 22px;
  }

  .rch-custom-bar-icon-shape {
    width: 16px;
    height: 16px;
  }

  .rch-custom-input {
    font-size: 17px;
    line-height: 1.2;
  }

  .rch-custom-close {
    flex: 0 0 24px;
    width: 24px;
    height: 24px;
  }

  .rch-custom-results {
    padding-top: 22px;
    padding-bottom: 22px;
    row-gap: 22px;
  }

  .rch-custom-categories-col {
    padding-bottom: 18px;
  }

  .rch-custom-heading {
    margin-bottom: 14px;
    font-size: 19px;
  }

  .rch-custom-category-item {
    padding: 8px 0;
    font-size: 15px;
  }

  .rch-custom-products-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .rch-custom-product-card {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    width: 100%;
    padding: 16px 0;
    border-bottom: 1px solid rgba(90, 52, 43, 0.10) !important;
  }

  .rch-custom-product-image-wrap {
    width: 48px;
    height: 48px;
    aspect-ratio: auto;
    margin: 0;
    border-radius: 4px;
  }

	.rch-custom-product-image {
		width: 48px;
		max-width: none;
		height: 48px;
		object-fit: contain;
	}

  .rch-custom-product-content {
    align-items: flex-start;
    gap: 4px;
    text-align: left;
  }

.rch-custom-product-title {
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.3;
}

  .rch-custom-product-price {
    font-size: 12.5px;
    line-height: 1.25;
    text-align: left;
  }

  .rch-custom-see-all-wrap {
    margin-top: 20px;
  }

  .rch-custom-see-all {
    font-size: 14px;
  }
}
