/* Header search bar (includes/cc-search.php, assets/js/search-bar.js) */

/* In the header's top bar: the widget takes the free space left of the
   account links, and the bar sits centred in it at 70% of that width. */
.elementor-widget.cc-header-search {
	flex: 1 1 auto;
	max-width: none !important;
}

.elementor-widget.cc-header-search .cc-search {
	width: 70%;
	max-width: none;
	margin: 0 auto;
}

@media (max-width: 767px) {
	.elementor-widget.cc-header-search .cc-search {
		width: 100%;
	}
}

.cc-search {
	width: 100%;
	max-width: 520px;
}

.cc-search-form {
	display: flex;
	align-items: center;
	border: 1px solid #d9d9d9;
	border-radius: 999px;
	background: #fff;
	overflow: hidden;
}

.cc-search-input {
	flex: 1;
	min-width: 0;
	border: 0 !important;
	background: transparent !important;
	padding: 8px 16px !important;
	font-size: 15px;
}

.cc-search-submit {
	border: 0 !important;
	background: transparent !important;
	color: #333 !important;
	padding: 8px 14px !important;
}

.cc-search .aa-Autocomplete,
.aa-Panel,
.aa-DetachedOverlay {
	--aa-primary-color-rgb: 209, 88, 81;
	--aa-input-border-color-rgb: 217, 217, 217;
	--aa-font-size: 15px;
	--aa-search-input-height: 34px;
}

.cc-search .aa-Form {
	border-radius: 999px;
	background: #fff;
}

/* The theme styles every <button> as a yellow pill; these are icons. */
.cc-search .aa-SubmitButton,
.cc-search .aa-ClearButton,
.cc-search .aa-LoadingIndicator,
.aa-DetachedSearchButton,
.aa-DetachedCancelButton {
	background: transparent !important;
	border: 0 !important;
	box-shadow: none !important;
	color: #555 !important;
	padding: 0 8px !important;
	min-height: 0 !important;
	border-radius: 0 !important;
}

/* Keep the magnifier and clear icons vertically centred in the bar. */
.cc-search .aa-InputWrapperPrefix,
.cc-search .aa-InputWrapperSuffix,
.cc-search .aa-Label {
	display: flex;
	align-items: center;
	height: 100%;
	margin: 0;
}

.cc-search .aa-SubmitButton,
.cc-search .aa-ClearButton {
	display: flex !important;
	align-items: center;
	justify-content: center;
	height: 100% !important;
	line-height: 1 !important;
	margin: 0 !important;
}

.cc-search .aa-SubmitIcon,
.cc-search .aa-ClearIcon {
	display: block;
	margin: 0;
}

.cc-search .aa-Input {
	border: 0 !important;
	background: transparent !important;
	box-shadow: none !important;
	padding: 0 !important;
}

.aa-DetachedSearchButton {
	background: #fff !important;
	border-radius: 999px !important;
	height: 34px;
}

.aa-Panel {
	z-index: 10000;
}

/* Lift the dropdown off the page: a warm off-white ground, a visible edge and
   a deeper shadow, so it does not blend into white page content. */
.aa-Panel:not(.aa-Panel--detached) {
	margin-top: 6px !important;
	background: #f7f5f1;
	border: 1px solid rgba(0, 0, 0, 0.08);
	border-radius: 12px;
	box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18), 0 2px 6px rgba(0, 0, 0, 0.08);
	overflow: hidden;
}

.aa-Panel .aa-Item[aria-selected="true"] {
	background: #ece8e0;
}

.cc-search-heading {
	font-size: 12px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: #777;
}

.cc-search-product {
	display: flex;
	align-items: center;
	gap: 12px;
	width: 100%;
	color: inherit !important;
	text-decoration: none !important;
}

.cc-search-product img,
.cc-search-noimage {
	flex: 0 0 48px;
	width: 48px;
	height: 48px;
	object-fit: cover;
	border-radius: 6px;
	background: #f4f4f4;
}

.cc-search-text {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.cc-search-name {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.cc-search-price {
	font-size: 13px;
	color: #555;
}

.cc-search-badge {
	align-self: flex-start;
	margin-top: 2px;
	padding: 1px 8px;
	border-radius: 999px;
	font-size: 12px;
	color: #fff;
	background: var(--e-global-color-ac5c984, #D15851);
}

.cc-search-category,
.cc-search-all {
	display: block;
	width: 100%;
	color: inherit !important;
	text-decoration: none !important;
}

.cc-search-all {
	font-weight: 600;
	color: var(--e-global-color-b121af8, #B64C46) !important;
}

.cc-search-empty {
	color: #777;
}

.cc-search-pagination {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 16px;
	margin: 32px 0;
}

@media (max-width: 767px) {
	.cc-search {
		max-width: none;
	}
}

/* Homepage: the header sits transparent over the dark hero until the sticky
   effect turns it white (cc-theme style.css "Magic Sticky Header"). Over the
   hero the bar is dark and translucent — visible without a white slab. */
body.home .magic-sticky-topbar:not(.elementor-sticky--effects) .cc-search .aa-Form {
	background: rgba(255, 255, 255, 0.1);
	border-color: rgba(255, 255, 255, 0.25);
	backdrop-filter: blur(6px);
	-webkit-backdrop-filter: blur(6px);
}

body.home .magic-sticky-topbar:not(.elementor-sticky--effects) .cc-search .aa-Form:focus-within {
	background: rgba(255, 255, 255, 0.16);
	border-color: rgba(255, 255, 255, 0.45);
	box-shadow: none;
}

body.home .magic-sticky-topbar:not(.elementor-sticky--effects) .cc-search .aa-Input {
	color: #fff !important;
}

body.home .magic-sticky-topbar:not(.elementor-sticky--effects) .cc-search .aa-Input::placeholder {
	color: rgba(255, 255, 255, 0.65);
}

body.home .magic-sticky-topbar:not(.elementor-sticky--effects) .cc-search .aa-SubmitIcon,
body.home .magic-sticky-topbar:not(.elementor-sticky--effects) .cc-search .aa-ClearIcon {
	color: rgba(255, 255, 255, 0.85);
}

body.home .magic-sticky-topbar:not(.elementor-sticky--effects) .cc-search .aa-SubmitButton,
body.home .magic-sticky-topbar:not(.elementor-sticky--effects) .cc-search .aa-ClearButton {
	color: rgba(255, 255, 255, 0.85) !important;
}


/* Results page: count, matching categories, empty state. */
.cc-search-summary {
	margin: 0 0 24px;
	text-align: center;
}

.cc-search-count {
	margin: 0 0 12px;
	font-size: 16px;
	color: #555;
}

.cc-search-categories {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	align-items: center;
	gap: 8px;
}

.cc-search-categories-label {
	font-size: 14px;
	color: #777;
}

.cc-search-chip {
	display: inline-block;
	padding: 6px 14px;
	border: 1px solid #ddd;
	border-radius: 999px;
	font-size: 14px;
	color: #333 !important;
	text-decoration: none !important;
	background: #fff;
}

.cc-search-chip:hover {
	border-color: var(--e-global-color-ac5c984, #D15851);
	color: var(--e-global-color-b121af8, #B64C46) !important;
}

.cc-search-empty-state {
	max-width: 640px;
	margin: 24px auto 48px;
	text-align: center;
}

.cc-search-empty-title {
	margin: 0 0 8px;
	font-size: 20px;
	font-weight: 600;
}

.cc-search-empty-hint {
	margin: 0 0 20px;
	color: #666;
}
