/* CT Live Search — base structural styles.
   Colors, sizes, fonts, borders etc. are all controlled from the Elementor
   Style tab and injected by Elementor itself via the {{WRAPPER}} selectors
   defined in the widget's controls — this file only handles layout/behaviour
   that isn't meant to be user-editable. */

.ctls-search-widget {
	position: relative;
	max-width: 100%;
}

.ctls-search-form {
	display: flex;
	align-items: center;
	width: 100%;
	box-sizing: border-box;
}

.ctls-input {
	flex: 1;
	min-width: 0;
	border: none;
	outline: none;
	background: transparent;
	box-sizing: border-box;
}

.ctls-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	line-height: 1;
}

.ctls-icon img {
	display: block;
	object-fit: contain;
}

.ctls-icon-left {
	order: -1;
}

.ctls-icon-right {
	order: 1;
}

.ctls-results {
	display: none;
	position: absolute;
	top: 100%;
	left: 0;
	right: 0;
	z-index: 9999;
	margin-top: 4px;
	padding: 4px;
	box-sizing: border-box;
	grid-template-columns: repeat(1, 1fr);
	gap: 4px;
}

.ctls-results.ctls-active {
	display: grid;
}

.ctls-result-item {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 8px;
	padding: 8px;
	border-radius: 4px;
	transition: background-color 0.15s ease;
}

.ctls-result-link {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	width: 100%;
	box-sizing: border-box;
	text-decoration: none;
	color: inherit;
}

.ctls-result-img {
	flex-shrink: 0;
	object-fit: cover;
	border-radius: 4px;
}

.ctls-result-info {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.ctls-result-title {
	font-weight: 600;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

/* Applied via JS from the "Wrap Title Text" setting — kept in the plugin's
   own stylesheet (rather than relying only on Elementor's generated CSS)
   so it takes effect right away after an update. */
.ctls-results.ctls-wrap-titles .ctls-result-title {
	white-space: normal;
	overflow: visible;
	text-overflow: clip;
	overflow-wrap: break-word;
	word-break: break-word;
}

.ctls-result-price {
	font-size: 13px;
}

.ctls-result-excerpt {
	font-size: 12px;
	opacity: 0.75;
}

.ctls-result-actions {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-shrink: 0;
	justify-content: flex-start;
	width: 100%;
}

.ctls-qty-input {
	width: 60px;
	flex-shrink: 0;
	padding: 6px;
	text-align: center;
	box-sizing: border-box;
	border: 1px solid #dddddd;
	border-radius: 3px;
}

.ctls-add-to-cart {
	flex-shrink: 0;
	white-space: nowrap;
	min-width: 120px;
	padding: 10px 16px;
	font-size: 15px;
	border: 1px solid #222222;
	background-color: #222222;
	color: #ffffff;
	border-radius: 3px;
	cursor: pointer;
	transition: opacity 0.15s ease;
}

.ctls-add-to-cart.ctls-loading {
	opacity: 0.6;
	cursor: default;
}

.ctls-no-results {
	grid-column: 1 / -1;
	padding: 14px;
	text-align: center;
	font-size: 13px;
	opacity: 0.7;
}

.ctls-view-all {
	grid-column: 1 / -1;
	display: block;
	text-align: center;
	padding: 10px;
	margin-top: 4px;
	border-top: 1px solid #eeeeee;
	font-weight: 600;
	text-decoration: none;
	color: inherit;
	transition: background-color 0.15s ease, color 0.15s ease;
	box-sizing: border-box;
}

.ctls-view-all:hover {
	opacity: 0.75;
}

.ctls-branding {
	display: block;
	text-align: right;
	margin-top: 4px;
}

.ctls-branding a {
	text-decoration: none;
	font-weight: 600;
}

/* [ctls_search_results] standalone page */

.ctls-search-page {
	display: flex;
	gap: 32px;
	align-items: flex-start;
}

.ctls-sp-sidebar {
	flex: 0 0 220px;
	max-width: 220px;
}

.ctls-sp-sidebar h3 {
	margin: 0 0 12px;
}

.ctls-sp-cats {
	list-style: none;
	margin: 0;
	padding: 0;
}

.ctls-sp-cats li {
	margin-bottom: 8px;
}

.ctls-sp-cats a {
	text-decoration: none;
}

.ctls-sp-cat-active a {
	font-weight: 700;
}

.ctls-sp-main {
	flex: 1;
	min-width: 0;
}

.ctls-sp-heading {
	font-size: 15px;
	margin: 0 0 12px;
}

.ctls-sp-suggestions {
	margin-bottom: 16px;
}

.ctls-sp-suggestions h4 {
	margin: 0 0 8px;
	font-size: 14px;
}

.ctls-sp-suggestion-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 16px;
}

.ctls-sp-suggestion-chips a {
	text-decoration: none;
}

.ctls-sp-toolbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 12px;
	margin-bottom: 16px;
}

.ctls-sp-count {
	font-size: 13px;
	opacity: 0.75;
	margin: 0;
}

.ctls-sp-sort select {
	padding: 6px 10px;
	border: 1px solid #ddd;
	border-radius: 6px;
	font-size: 13px;
}

.ctls-sp-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 24px;
}

.ctls-sp-item {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 8px;
	padding: 14px;
	box-sizing: border-box;
	transition: box-shadow 0.15s ease;
}

.ctls-sp-item:hover {
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.ctls-sp-wishlist {
	position: absolute;
	top: 10px;
	right: 10px;
	z-index: 2;
}

.ctls-sp-item-link {
	display: flex;
	flex-direction: column;
	gap: 6px;
	width: 100%;
	text-decoration: none;
	color: inherit;
}

.ctls-sp-item-img {
	width: 100%;
	height: auto;
	object-fit: cover;
}

.ctls-sp-item-title {
	font-weight: 600;
}

.ctls-sp-no-results {
	padding: 20px 0;
}

/* Add to Cart pinned to the bottom of every card, regardless of how many
   lines the title above it wraps to - so buttons line up across a row even
   when titles are different lengths (2 lines vs 4 lines, etc). */
.ctls-sp-item .ctls-result-actions {
	margin-top: auto;
	width: 100%;
	padding-top: 6px;
}

.ctls-sp-pagination {
	display: flex;
	align-items: center;
	gap: 16px;
	justify-content: center;
	margin-top: 32px;
}

.ctls-sp-pagination a {
	text-decoration: none;
	font-weight: 600;
}

.ctls-sp-pagination .ctls-sp-page-status {
	font-size: 13px;
	opacity: 0.75;
}

@media (max-width: 767px) {
	.ctls-search-page {
		flex-direction: column;
	}

	.ctls-sp-sidebar {
		max-width: 100%;
	}
}
