/* 
 * ChangoTools Frontend Base Styles (Premium Default)
 */

/* ==========================================================================
   AJAX Filter
   ========================================================================== */
.changotools-filter-container {
	position: relative;
	font-family: var(--e-global-typography-primary-font-family), -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.changotools-filter-group {
	margin-bottom: 30px;
}

.changotools-filter-title {
	margin: 0 0 15px 0;
	font-size: 1.15em;
	font-weight: 600;
	color: #1a1a1a;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.changotools-filter-items {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.changotools-filter-item {
	display: flex;
	align-items: center;
}

.changotools-filter-item label {
	display: flex;
	align-items: center;
	gap: 12px;
	cursor: pointer;
	margin: 0;
	font-size: 0.95em;
	color: #444;
	transition: all 0.3s ease;
}

.changotools-filter-item label:hover {
	color: #000;
	transform: translateX(3px);
}

/* Custom Checkbox/Radio */
.changotools-filter-item input[type="checkbox"],
.changotools-filter-item input[type="radio"] {
	appearance: none;
	-webkit-appearance: none;
	width: 18px;
	height: 18px;
	border: 2px solid #ddd;
	border-radius: 4px; /* Circle for radio if needed, but keeping unified for now */
	outline: none;
	cursor: pointer;
	position: relative;
	transition: all 0.2s ease;
	background: #fff;
}
.changotools-filter-items.type-radio input[type="radio"] {
	border-radius: 50%;
}
.changotools-filter-item input:checked {
	background-color: #000;
	border-color: #000;
}
.changotools-filter-item input[type="checkbox"]:checked::after {
	content: '';
	position: absolute;
	left: 5px;
	top: 1px;
	width: 5px;
	height: 10px;
	border: solid white;
	border-width: 0 2px 2px 0;
	transform: rotate(45deg);
}
.changotools-filter-item input[type="radio"]:checked::after {
	content: '';
	position: absolute;
	left: 4px;
	top: 4px;
	width: 6px;
	height: 6px;
	background: white;
	border-radius: 50%;
}

/* Color Swatches */
.changotools-filter-items.type-color {
	flex-direction: row;
	flex-wrap: wrap;
	gap: 12px;
}
.changotools-filter-items.type-color input[type="checkbox"],
.changotools-filter-items.type-color input[type="radio"] {
	display: none;
}
.changotools-color-swatch {
	display: inline-block;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	border: 2px solid #fff;
	box-shadow: 0 3px 8px rgba(0,0,0,0.1);
	transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s;
	position: relative;
}
.changotools-color-swatch::after {
	content: '';
	position: absolute;
	top: -4px;
	left: -4px;
	right: -4px;
	bottom: -4px;
	border-radius: 50%;
	border: 2px solid transparent;
	transition: border-color 0.3s ease;
}
.changotools-filter-items.type-color input:checked + .changotools-color-swatch::after {
	border-color: #000;
}
.changotools-filter-items.type-color input:checked + .changotools-color-swatch {
	transform: scale(1.1);
	box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* Brand Images */
.changotools-filter-items.type-image {
	flex-direction: row;
	flex-wrap: wrap;
	gap: 15px;
}
.changotools-filter-items.type-image input[type="checkbox"],
.changotools-filter-items.type-image input[type="radio"] {
	display: none;
}
.changotools-brand-image {
	max-width: 80px;
	height: auto;
	filter: grayscale(100%) opacity(0.6);
	transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
	border-radius: 8px;
}
.changotools-filter-items.type-image input:checked + .changotools-brand-image,
.changotools-filter-items.type-image label:hover .changotools-brand-image {
	filter: grayscale(0%) opacity(1);
	transform: scale(1.05);
}
.changotools-brand-text {
	padding: 8px 16px;
	background: #f8f9fa;
	border-radius: 30px;
	border: 1px solid #eaeaea;
	transition: all 0.3s ease;
	font-weight: 500;
	color: #666;
}
.changotools-filter-items.type-image input:checked + .changotools-brand-text {
	background: #000;
	color: #fff;
	border-color: #000;
	box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

/* Select */
.changotools-select {
	width: 100%;
	padding: 12px 15px;
	border: 1px solid #eaeaea;
	border-radius: 8px;
	background: #fff;
	max-width: 100%;
	font-size: 0.95em;
	color: #444;
	transition: all 0.3s ease;
	appearance: none;
	background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
	background-repeat: no-repeat;
	background-position: right 15px center;
	background-size: 15px;
}
.changotools-select:focus {
	outline: none;
	border-color: #999;
	box-shadow: 0 0 0 3px rgba(0,0,0,0.05);
}

.changotools-filter-submit {
	width: 100%;
	padding: 14px 20px;
	background: #000;
	color: #fff;
	border: none;
	border-radius: 8px;
	cursor: pointer;
	margin-top: 15px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 1px;
	transition: all 0.3s ease;
}
.changotools-filter-submit:hover {
	background: #333;
	transform: translateY(-2px);
	box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}


/* ==========================================================================
   AJAX Search
   ========================================================================== */
.changotools-search-container {
	position: relative;
	width: 100%;
	font-family: var(--e-global-typography-primary-font-family), -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body .elementor-widget .changotools-search-input-wrapper {
	display: flex !important;
	align-items: center !important;
	position: relative !important;
	background: #ffffff;
	border-radius: 8px;
	box-shadow: 0 4px 20px rgba(0,0,0,0.06);
	border: 1px solid rgba(0,0,0,0.05);
	transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
}
body .elementor-widget .changotools-search-input-wrapper:focus-within {
	box-shadow: 0 8px 30px rgba(0,0,0,0.12);
	border-color: rgba(0,0,0,0.1);
	transform: translateY(-2px);
}

body .elementor-widget .changotools-search-form {
	margin: 0 !important;
	padding: 0 !important;
	border: none !important;
	background: transparent !important;
}

body .elementor-widget .changotools-search-input {
	appearance: none !important;
	-webkit-appearance: none !important;
	outline: none !important;
	margin: 0 !important;
	flex-grow: 1 !important;
	padding: 16px 55px 16px 24px;
	font-size: 16px;
	line-height: 1.5;
	width: 100% !important;
	height: auto !important;
	box-sizing: border-box !important;
	color: #333;
	background: transparent !important;
	border: none !important;
	border-radius: 8px;
	box-shadow: none !important;
}
body .elementor-widget .changotools-search-input:focus {
	outline: none !important;
	box-shadow: none !important;
	border: none !important;
}
body .elementor-widget .changotools-search-input::placeholder {
	color: #aaa !important;
	font-weight: 400 !important;
	opacity: 1 !important;
}

body .elementor-widget .changotools-search-submit {
	appearance: none !important;
	-webkit-appearance: none !important;
	outline: none !important;
	margin: 0 !important;
	position: absolute !important;
	right: 6px !important;
	top: 50% !important;
	transform: translateY(-50%) !important;
	color: #fff;
	background: #111;
	cursor: pointer !important;
	width: 44px !important;
	height: 44px !important;
	border-radius: 8px;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	border: none;
	transition: all 0.3s ease !important;
	padding: 0 !important;
}
body .elementor-widget .changotools-search-submit:hover {
	background: #333;
	transform: translateY(-50%) scale(1.05) !important;
}
body .elementor-widget .changotools-search-clear {
	all: unset !important;
	position: absolute !important;
	right: 60px !important;
	top: 50% !important;
	transform: translateY(-50%) !important;
	color: #999 !important;
	cursor: pointer !important;
	padding: 5px !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	transition: color 0.3s ease !important;
}
body .elementor-widget .changotools-search-clear:hover {
	color: #111 !important;
}
body .elementor-widget .changotools-search-submit svg {
	width: 20px !important;
	height: 20px !important;
	stroke: #ffffff !important;
	fill: none !important;
	margin: 0 !important;
	padding: 0 !important;
}
body .elementor-widget .changotools-search-submit:hover {
	background: #333 !important;
	transform: translateY(-50%) scale(1.05) !important;
	border: none !important;
}

/* Glassmorphism Dropdown */
.changotools-search-results-dropdown {
	position: absolute;
	top: calc(100% + 15px);
	left: 0;
	right: 0;
	background: rgba(255, 255, 255, 0.95);
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
	border: 1px solid rgba(0,0,0,0.05);
	border-radius: 12px;
	box-shadow: 0 15px 35px rgba(0,0,0,0.1);
	z-index: 9999;
	overflow: hidden;
	opacity: 0;
	transform: translateY(10px);
	animation: slideUpFade 0.3s forwards;
}

@keyframes slideUpFade {
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.changotools-search-results-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.changotools-search-results-list li {
	border-bottom: 1px solid rgba(0,0,0,0.04);
}

.changotools-search-results-list li:last-child {
	border-bottom: none;
}

.changotools-search-results-list a {
	display: flex;
	align-items: center;
	padding: 16px 20px;
	text-decoration: none;
	color: inherit;
	transition: all 0.3s ease;
}

.changotools-search-results-list a:hover {
	background: rgba(0,0,0,0.02);
	padding-left: 25px;
}

.changotools-result-img {
	width: 55px;
	height: 55px;
	flex-shrink: 0;
	margin-right: 18px;
	border-radius: 8px;
	overflow: hidden;
	box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.changotools-result-img img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.5s ease;
}
.changotools-search-results-list a:hover .changotools-result-img img {
	transform: scale(1.1);
}

.changotools-result-info {
	display: flex;
	flex-direction: column;
	justify-content: center;
}

.changotools-result-title {
	font-weight: 600;
	font-size: 0.95rem;
	margin-bottom: 6px;
	color: #222;
	line-height: 1.3;
}

.changotools-result-price {
	color: #666;
	font-size: 0.9rem;
	font-weight: 500;
}

.changotools-search-all {
	display: block;
	text-align: center;
	padding: 15px;
	background: rgba(0,0,0,0.03);
	color: #333;
	text-decoration: none;
	font-weight: 600;
	font-size: 0.9rem;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	transition: all 0.3s ease;
}

.changotools-search-all:hover {
	background: #000;
	color: #fff;
}

.changotools-no-results {
	padding: 30px 20px;
	text-align: center;
	color: #888;
	font-size: 0.95rem;
}
