/* Noon — search overlay + product finder (assets/noon-search.js). Logical properties: works LTR and RTL. */

html.noon-so-lock, html.noon-so-lock body { overflow: hidden; }

.noon-so {
	--so-bg: #f8f5ef;
	--so-ink: #1d1c1a;
	--so-soft: #5f5b54;
	--so-line: #e4ddd0;
	--so-gold: #8c6c3d;
	position: fixed;
	inset: 0;
	z-index: 100000;
	background: rgba(20, 19, 18, .45);
	display: flex;
	justify-content: center;
	align-items: flex-start;
	opacity: 0;
	transition: opacity .18s ease;
	color: var(--so-ink);
	font-family: inherit;
}
.noon-so[hidden] { display: none; }
.noon-so.is-open { opacity: 1; }
.noon-so svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.noon-so[dir="rtl"] .noon-so-arrow { transform: scaleX(-1); }

.noon-so__panel {
	background: var(--so-bg);
	width: 100%;
	max-width: 760px;
	max-height: 100%;
	display: flex;
	flex-direction: column;
	box-shadow: 0 20px 60px rgba(0, 0, 0, .18);
	transform: translateY(-12px);
	transition: transform .2s ease;
}
.noon-so.is-open .noon-so__panel { transform: none; }
@media (min-width: 850px) {
	.noon-so { padding-top: 6vh; }
	.noon-so__panel { max-height: 86vh; border-radius: 10px; overflow: hidden; }
}
@media (max-width: 849px) {
	.noon-so { background: var(--so-bg); }
	.noon-so__panel { height: 100%; box-shadow: none; }
}
@media (prefers-reduced-motion: reduce) { .noon-so, .noon-so__panel { transition: none; } }

/* bar */
.noon-so__bar {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 12px 16px;
	border-bottom: 1px solid var(--so-line);
	background: #fff;
	margin: 0;
}
.noon-so__icon { color: var(--so-soft); display: flex; }
.noon-so__bar input[type=search] {
	flex: 1;
	min-width: 0;
	border: 0 !important;
	box-shadow: none !important;
	background: transparent !important;
	font-size: 18px !important;
	height: 44px;
	margin: 0 !important;
	padding: 0 !important;
	color: var(--so-ink);
}
.noon-so__bar input[type=search]::-webkit-search-cancel-button { display: none; }
.noon-so__bar input:focus { outline: none; }
.noon-so__close {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	min-height: 0;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: var(--so-ink);
	cursor: pointer;
}
.noon-so__close:hover { background: var(--so-line); }

.noon-so__body, .noon-fd__body { overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 16px; flex: 1; overscroll-behavior: contain; }
.noon-so__body section + section { margin-top: 22px; }
.noon-so-h {
	font-size: 12px !important;
	font-weight: 600;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: var(--so-soft) !important;
	margin: 0 0 10px;
}
.noon-so[dir="rtl"] .noon-so-h { letter-spacing: 0; font-size: 13px !important; }
.noon-so-muted { color: var(--so-soft); font-weight: 400; }

/* chips */
.noon-so-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.noon-so-chip {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	min-height: 40px;
	margin: 0;
	padding: 0 14px;
	border: 1px solid var(--so-line);
	border-radius: 999px;
	background: #fff;
	color: var(--so-ink);
	font-size: 14px;
	font-weight: 500;
	text-transform: none;
	letter-spacing: 0;
	line-height: 1;
	cursor: pointer;
}
.noon-so-chip svg { width: 15px; height: 15px; color: var(--so-soft); }
.noon-so-chip:hover, .noon-so-chip:focus-visible { border-color: var(--so-gold); color: var(--so-gold); }

/* categories */
.noon-so-cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; }
.noon-so-cat { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; color: var(--so-ink); font-size: 13px; font-weight: 500; }
.noon-so-cat__img { width: 100%; aspect-ratio: 1; border-radius: 8px; overflow: hidden; background: #ece6da; }
.noon-so-cat__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.noon-so-cat:hover img { transform: scale(1.05); }

/* product rows */
.noon-so-list { display: grid; gap: 2px; }
@media (min-width: 600px) { .noon-so-list { grid-template-columns: 1fr 1fr; gap: 4px 12px; } }
.noon-so-item {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 8px;
	border-radius: 8px;
	color: var(--so-ink);
}
.noon-so-item:hover, .noon-so-item.is-active, .noon-so-item:focus-visible { background: #fff; color: var(--so-ink); }
.noon-so-item__img { flex: none; width: 64px; height: 64px; border-radius: 6px; overflow: hidden; background: #ece6da; }
.noon-so-item__img img { width: 100%; height: 100%; object-fit: cover; }
.noon-so-item__body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.noon-so-item__name { font-weight: 500; font-size: 15px; line-height: 1.3; }
.noon-so-item__meta { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.noon-so-item__price { color: var(--so-gold); font-weight: 600; }
.noon-so-from { color: var(--so-soft); font-weight: 400; font-size: 12px; }
.noon-so-dots { display: inline-flex; gap: 4px; }
.noon-so-dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; border: 1px solid rgba(0, 0, 0, .15); }
.noon-so-dot--silver { background: linear-gradient(135deg, #f1f1f1, #a9a9a9); }
.noon-so-dot--gold { background: linear-gradient(135deg, #f3dfa6, #b08d57); }

.noon-so-all {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	margin-top: 12px;
	min-height: 48px;
	border-radius: 6px;
	background: var(--so-ink);
	color: #fff !important;
	font-weight: 600;
}
.noon-so-all:hover, .noon-so-all.is-active { background: var(--so-gold); }
.noon-so-empty { padding: 8px 0 16px; }
.noon-so-empty p { margin: 0 0 4px; }

/* finder call to action (search overlay, home, shop) */
.noon-so-cta {
	display: flex;
	align-items: center;
	gap: 14px;
	width: 100%;
	margin: 16px 0 0;
	padding: 16px;
	border: 1px solid #e2d3b8;
	border-radius: 10px;
	background: linear-gradient(135deg, #fffaf0, #f3ead9);
	color: var(--so-ink);
	text-align: start;
	text-transform: none;
	letter-spacing: 0;
	line-height: 1.4;
	font-weight: 400;
	cursor: pointer;
}
.noon-so-cta__icon { display: flex; align-items: center; justify-content: center; flex: none; width: 44px; height: 44px; border-radius: 50%; background: var(--so-ink); color: #f3dfa6; }
.noon-so-cta__text { display: flex; flex-direction: column; flex: 1; font-size: 14px; color: var(--so-soft); }
.noon-so-cta__text strong { color: var(--so-ink); font-size: 16px; }
.noon-so-cta__go { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--so-gold); white-space: nowrap; }
@media (max-width: 549px) { .noon-so-cta { flex-wrap: wrap; } .noon-so-cta__go { width: 100%; justify-content: flex-end; } }

/* ---------- finder ---------- */
.noon-fd__top { display: flex; align-items: center; gap: 12px; padding: 10px 12px; background: #fff; border-bottom: 1px solid var(--so-line); }
.noon-fd__back {
	display: inline-flex; align-items: center; gap: 6px; margin: 0; padding: 0 10px; min-height: 44px;
	border: 0; background: transparent; color: var(--so-ink); font-weight: 500; text-transform: none; letter-spacing: 0; cursor: pointer;
}
.noon-fd__back .noon-so-arrow { transform: scaleX(-1); }
.noon-so[dir="rtl"] .noon-fd__back .noon-so-arrow { transform: none; }
.noon-fd__progress { flex: 1; height: 4px; border-radius: 4px; background: var(--so-line); overflow: hidden; }
.noon-fd__progress span { display: block; height: 100%; width: 0; background: var(--so-gold); transition: width .25s ease; }
.noon-fd__body { padding: 24px 16px 32px; }
@media (min-width: 850px) { .noon-fd__body { padding: 32px 40px 40px; } }
.noon-fd__step { margin: 0 0 6px; font-size: 13px; color: var(--so-gold); font-weight: 600; }
.noon-fd__q { margin: 0 0 6px; font-size: 24px; line-height: 1.3; }
.noon-fd__q:focus { outline: none; }
.noon-fd__opts { display: grid; gap: 10px; margin-top: 18px; }
@media (min-width: 600px) { .noon-fd__opts--grid { grid-template-columns: 1fr 1fr; } }
.noon-fd__opt {
	display: flex; align-items: center; gap: 14px; width: 100%; margin: 0; padding: 14px 16px; min-height: 64px;
	border: 1.5px solid var(--so-line); border-radius: 10px; background: #fff; color: var(--so-ink);
	text-align: start; text-transform: none; letter-spacing: 0; font-weight: 400; line-height: 1.35; cursor: pointer;
	transition: border-color .15s, box-shadow .15s;
}
.noon-fd__opt:hover { border-color: #cdb894; }
.noon-fd__opt.is-on { border-color: var(--so-gold); box-shadow: 0 0 0 1px var(--so-gold); background: #fffaf0; }
.noon-fd__ic { display: flex; align-items: center; justify-content: center; flex: none; width: 44px; height: 44px; border-radius: 50%; background: #f3ede2; color: var(--so-gold); }
.noon-fd__ic svg { width: 22px; height: 22px; }
.noon-fd__ic .noon-so-dot { width: 26px; height: 26px; }
.noon-fd__lbl { display: flex; flex-direction: column; gap: 2px; }
.noon-fd__lbl strong { font-size: 16px; font-weight: 600; }
.noon-fd__lbl span { font-size: 13px; color: var(--so-soft); }
.noon-fd__next { margin: 20px 0 0 !important; display: inline-flex !important; align-items: center; gap: 8px; }
.noon-fd__next[disabled] { opacity: .45; pointer-events: none; }

.noon-fd__picks { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin: 18px 0; }
@media (min-width: 700px) { .noon-fd__picks { grid-template-columns: repeat(3, 1fr); } }
.noon-so-item--tile { flex-direction: column; align-items: stretch; padding: 0; background: #fff; overflow: hidden; border: 1px solid var(--so-line); }
.noon-so-item--tile .noon-so-item__img { width: 100%; height: auto; aspect-ratio: 1; border-radius: 0; }
.noon-so-item--tile .noon-so-item__body { padding: 8px 10px 12px; }
.noon-fd__actions { display: flex; flex-wrap: wrap; gap: 10px; }
.noon-fd__actions .button { margin: 0 !important; display: inline-flex; align-items: center; gap: 8px; }
.noon-fd__wa { display: inline-flex; align-items: center; gap: 8px; margin-top: 16px; color: #1f7a4d; font-weight: 500; }

/* finder banner on home / shop ([noon_finder] shortcode) */
.noon-finder-banner { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.noon-finder-banner .noon-so-cta { margin: 0; padding: 20px; }
.noon-finder-banner .noon-so-cta svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
html[dir="rtl"] .noon-finder-banner .noon-so-arrow { transform: scaleX(-1); }

/* ---------- shop chips (Noon_Search::shop_chips) ---------- */
.noon-chips { margin: 0 0 16px; display: grid; gap: 8px; width: 100%; }
.noon-chips__row { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; -webkit-overflow-scrolling: touch; }
.noon-chips__row::-webkit-scrollbar { display: none; }
@media (min-width: 850px) { .noon-chips__row { flex-wrap: wrap; overflow: visible; } }
.noon-chip {
	display: inline-flex; align-items: center; gap: 6px; flex: none; min-height: 38px; padding: 0 14px;
	border: 1px solid #e4ddd0; border-radius: 999px; background: #fff; color: #1d1c1a; font-size: 14px; font-weight: 500; white-space: nowrap;
}
.noon-chip:hover { border-color: #8c6c3d; color: #8c6c3d; }
.noon-chip.is-on { background: #1d1c1a; border-color: #1d1c1a; color: #fff; }
.noon-chip--sub { min-height: 34px; font-size: 13px; background: transparent; }
.noon-chip--finder { border-color: #e2d3b8; background: #fffaf0; color: #7a5c30; }
.noon-chip .noon-so-dot { width: 14px; height: 14px; border-radius: 50%; border: 1px solid rgba(0,0,0,.15); display: inline-block; }
.noon-chip .noon-so-dot--silver { background: linear-gradient(135deg, #f1f1f1, #a9a9a9); }
.noon-chip .noon-so-dot--gold { background: linear-gradient(135deg, #f3dfa6, #b08d57); }
.woocommerce-no-products-found + .noon-finder-banner, .woocommerce-info + .noon-finder-banner { margin-top: 16px; padding: 0; }
