/* =====================================================================
 * Shera Shop — AJAX filter styling
 * ===================================================================== */

/* ---------------------------------------------------------------------
 * Loading state on the product grid
 * ------------------------------------------------------------------- */
#shera-shop-products-wrap {
	position: relative;
	min-height: 120px;
	transition: opacity 0.2s ease;
}

#shera-shop-products-wrap.is-loading {
	opacity: 0.45;
	pointer-events: none;
}

#shera-shop-products-wrap.is-loading::after {
	content: '';
	position: absolute;
	top: 40%;
	left: 50%;
	width: 42px;
	height: 42px;
	margin: -21px 0 0 -21px;
	border: 3px solid rgba(0, 0, 0, 0.12);
	border-top-color: currentColor;
	border-radius: 50%;
	animation: shera-spin 0.7s linear infinite;
}

@keyframes shera-spin {
	to { transform: rotate( 360deg ); }
}

.shera-shop-filters input,
.shera-shop-filters button,
#shera-sort {
	transition: opacity 0.15s ease;
}

.shera-shop-filters input:disabled,
.shera-shop-filters button:disabled,
#shera-sort:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

.shera-shop-error {
	padding: 2rem 1rem;
	text-align: center;
	width: 100%;
	color: #b42318;
}

/* ---------------------------------------------------------------------
 * Filter checkboxes
 * ------------------------------------------------------------------- */
.shera-filter-check {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.35rem 0;
	cursor: pointer;
	font-size: 0.9rem;
}

.shera-filter-check em {
	font-style: normal;
	opacity: 0.55;
	font-size: 0.8em;
	margin-left: auto;
}

.shera-filter-clear {
	margin-top: 1rem;
	width: 100%;
	text-align: center;
	cursor: pointer;
	border: none;
	background: transparent;
}

/* ---------------------------------------------------------------------
 * Product badges
 * ------------------------------------------------------------------- */
.shera-product-badges {
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	gap: 0.35rem;
	margin: 0.4rem 0;
	padding: 0;
}

.shera-product-badges li {
	font-size: 0.72rem;
	line-height: 1;
	padding: 0.3rem 0.55rem;
	border-radius: 999px;
	background: rgba(0, 0, 0, 0.06);
}

.shera-badge {
	position: absolute;
	top: 10px;
	left: 10px;
	font-size: 0.7rem;
	padding: 0.25rem 0.6rem;
	border-radius: 4px;
	background: #b42318;
	color: #fff;
	z-index: 2;
}

/* ---------------------------------------------------------------------
 * Pagination
 * ------------------------------------------------------------------- */
.tea__pagination ul {
	display: flex;
	align-items: center;
	gap: 0.4rem;
	list-style: none;
	padding: 0;
	margin: 1.5rem 0 0;
	justify-content: center;
}

.tea__pagination a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 38px;
	height: 38px;
	border-radius: 6px;
	text-decoration: none;
}

.tea__pagination a.is-active {
	background: currentColor;
}

.tea__pagination a.is-active,
.tea__pagination a.is-active * {
	color: #fff;
}

.tea__page-dots {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 24px;
	opacity: 0.5;
}

/* ---------------------------------------------------------------------
 * Filter row / toolbar layout
 * ------------------------------------------------------------------- */
.tea__shop-filter-right {
	display: flex;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
	justify-content: flex-end;
}

/* Sort pill */
.sort__box {
	position: relative;
	display: inline-flex;
	align-items: center;
	background: #fff;
	border: 1px solid #E8DEC9;
	border-radius: 999px;
	padding-left: 34px;
	height: 46px;
}

.sort__icon {
	position: absolute;
	left: 12px;
	top: 50%;
	transform: translateY(-50%);
	color: #8B1A1A;
	display: inline-flex;
	pointer-events: none;
}

.sort__box select {
	appearance: none;
	-webkit-appearance: none;
	background: transparent url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%238B1A1A' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>") no-repeat right 14px center;
	border: none;
	outline: none;
	padding: 0 36px 0 8px;
	height: 100%;
	font-size: 14px;
	color: #5A1E1E;
	cursor: pointer;
}

/* Search pill */
.tea__shop-search {
	position: relative;
	flex: 1;
	min-width: 220px;
	max-width: 360px;
}

.tea__search-box {
	position: relative;
	display: flex;
	align-items: center;
	background: #fff;
	border: 1px solid #E8DEC9;
	border-radius: 999px;
	height: 46px;
	padding: 0 6px 0 38px;
}

.tea__search-box .search-icon {
	position: absolute;
	left: 14px;
	top: 50%;
	transform: translateY(-50%);
	color: #8B1A1A;
	display: inline-flex;
	pointer-events: none;
}

.tea__search-box .form-control {
	flex: 1;
	border: none;
	outline: none;
	background: transparent;
	font-size: 14px;
	color: #3A2424;
	padding: 0 8px;
	box-shadow: none;
}

.tea__search-box .form-control::placeholder {
	color: #B8A98F;
}

/* Results count */
.shera-shop-results-count {
	font-size: 14px;
	color: #6B5A5A;
	white-space: nowrap;
}

/* View toggle */
.shera-view-toggle {
	display: inline-flex;
	background: #fff;
	border: 1px solid #E8DEC9;
	border-radius: 999px;
	height: 46px;
	overflow: hidden;
}

.shera-view-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 46px;
	height: 100%;
	border: none;
	background: transparent;
	color: #8B1A1A;
	cursor: pointer;
	transition: background .2s ease, color .2s ease;
}

.shera-view-btn:hover {
	background: #FAF4E8;
}

.shera-view-btn.is-active {
	background: #E8C36A;
	color: #5A1E1E;
}

/* Accordion icon alignment */
.accordion-button .shera-acc-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	margin-right: 10px;
	color: #8B1A1A;
	flex-shrink: 0;
}

.accordion-button .shera-acc-icon svg {
	display: block;
	width: 18px;
	height: 18px;
}

/* Clear Filters button (col-2) */
.shera-filter-clear.w-100 {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	height: 46px;
	width: 100%;
}

/* ---------------------------------------------------------------------
 * List view layout
 * ------------------------------------------------------------------- */
#shera-shop-products-wrap.shera-view-list {
	display: block !important;
}

#shera-shop-products-wrap.shera-view-list > [class*="col-"],
#shera-shop-products-wrap.shera-view-list > .product,
#shera-shop-products-wrap.shera-view-list > li.product {
	display: flex;
	align-items: center;
	gap: 24px;
	flex: 0 0 100% !important;
	max-width: 100% !important;
	width: 100% !important;
	margin-bottom: 20px;
}

#shera-shop-products-wrap.shera-view-list .tea__collection-img,
#shera-shop-products-wrap.shera-view-list .wc-block-grid__product-image {
	width: 220px;
	flex-shrink: 0;
}

/* ---------------------------------------------------------------------
 * Dual-thumb price range slider — single consolidated block
 * ------------------------------------------------------------------- */
.shera-price-slider {
	position: relative;
	height: 32px;
	margin: 0.5rem 0 0;
}

.shera-price-slider__track {
	position: absolute;
	top: 50%;
	left: 0;
	right: 0;
	height: 4px;
	margin-top: -2px;
	background: #e4e0da;
	border-radius: 4px;
	pointer-events: none;
}

.shera-price-slider__range {
	position: absolute;
	top: 0;
	bottom: 0;
	background: #8B1A1A;
	border-radius: 4px;
	pointer-events: none;
}

.shera-price-slider__input {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 32px;
	margin: 0;
	padding: 0;
	background: transparent;
	-webkit-appearance: none;
	appearance: none;
	pointer-events: none;          /* critical for dual-thumb */
	outline: none;
}

.shera-price-slider__input::-webkit-slider-runnable-track {
	background: transparent;
	border: none;
}

.shera-price-slider__input::-moz-range-track {
	background: transparent;
	border: none;
}

.shera-price-slider__input::-webkit-slider-thumb {
	-webkit-appearance: none;
	appearance: none;
	pointer-events: auto;          /* only thumb receives events */
	width: 16px;
	height: 16px;
	border-radius: 50%;
	background: #8B1A1A;
	border: 2px solid #fff;
	box-shadow: 0 2px 6px rgba(0, 0, 0, .15);
	cursor: grab;
	position: relative;
	z-index: 2;
}

.shera-price-slider__input::-webkit-slider-thumb:active {
	cursor: grabbing;
}

.shera-price-slider__input::-moz-range-thumb {
	pointer-events: auto;
	width: 16px;
	height: 16px;
	border-radius: 50%;
	background: #8B1A1A;
	border: 2px solid #fff;
	box-shadow: 0 2px 6px rgba(0, 0, 0, .15);
	cursor: grab;
}

.shera-price-slider__input::-moz-range-thumb:active {
	cursor: grabbing;
}

.shera-price-slider__input--min { z-index: 3; }
.shera-price-slider__input--max { z-index: 4; }

.shera-price-values {
	display: flex;
	justify-content: space-between;
	margin-top: 0.5rem;
	font-size: 0.85rem;
}

/* =====================================================================
 * LIVE SEARCH SUGGESTIONS DROPDOWN
 * ===================================================================== */
.shera-search-suggestions {
	position: absolute;
	top: calc(100% + 6px);
	left: 0;
	right: 0;
	max-height: 480px;
	overflow-y: auto;
	background: #fff;
	border: 1px solid rgba(0, 0, 0, 0.08);
	border-radius: 12px;
	box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12), 0 4px 12px rgba(0, 0, 0, 0.06);
	z-index: 500;
	padding: 8px;
	animation: shera-drop-in 0.18s cubic-bezier(0.34, 1.56, 0.64, 1);
	scrollbar-width: thin;
	box-sizing: border-box;
}

.shera-search-suggestions *,
.shera-search-suggestions *::before,
.shera-search-suggestions *::after {
	box-sizing: border-box;
}

.shera-search-suggestions::-webkit-scrollbar {
	width: 6px;
}

.shera-search-suggestions::-webkit-scrollbar-thumb {
	background: rgba(0, 0, 0, 0.15);
	border-radius: 4px;
}

@keyframes shera-drop-in {
	from {
		opacity: 0;
		transform: translateY(-6px) scale(0.98);
	}
	to {
		opacity: 1;
		transform: translateY(0) scale(1);
	}
}

.shera-suggestion {
	display: grid;
	grid-template-columns: 56px 1fr auto;
	align-items: center;
	gap: 12px;
	padding: 12px;
	border-radius: 8px;
	text-decoration: none;
	color: #1a1a1a;
	transition: background 0.15s ease;
	cursor: pointer;
	width: 100%;
	overflow: hidden;
}

.shera-suggestion:hover,
.shera-suggestion.is-active {
	background: #f7f5f2;
}

.shera-suggestion-img {
	width: 56px;
	height: 56px;
	border-radius: 8px;
	overflow: hidden;
	background: #f5f5f5;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.shera-suggestion-img img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.shera-suggestion-body {
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 3px;
	overflow: hidden;
}

.shera-suggestion-name {
	font-size: 14px;
	font-weight: 600;
	color: #1a1a1a;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	line-height: 1.3;
}

.shera-suggestion-short {
	font-size: 12px;
	color: #777;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	line-height: 1.3;
}

.shera-suggestion-meta {
	font-size: 11px;
	color: #8B1E3F;
	font-weight: 500;
	letter-spacing: 0.2px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	line-height: 1.3;
}

.shera-suggestion-price {
	display: flex;
	align-items: baseline;
	gap: 6px;
	flex-shrink: 0;
	font-size: 14px;
	font-weight: 700;
	color: #8B1E3F;
	white-space: nowrap;
	line-height: 1.3;
	text-align: right;
}

.shera-suggestion-price del {
	color: #999;
	font-weight: 400;
	font-size: 12px;
	text-decoration: line-through;
}

.shera-suggestion-price ins {
	text-decoration: none;
	color: #8B1E3F;
	font-weight: 700;
}

/* Search input shadow when suggestions are visible */
.tea__shop-search:has(.shera-search-suggestions:not([hidden])) .form-control {
	background: #fff;
	box-shadow: 0 4px 12px rgba(139, 30, 63, 0.08);
}

/* =====================================================================
 * RESPONSIVE
 * ===================================================================== */
@media (max-width: 991.98px) {
	.shera-shop-filters.row > .col-2,
	.shera-shop-filters.row > .col-8 {
		flex: 0 0 100%;
		max-width: 100%;
	}

	.tea__shop-filter-right {
		justify-content: flex-start;
	}
}

@media (max-width: 767px) {
	.tea__shop-filter {
		flex-direction: column;
	}

	.shera-search-suggestions {
		max-height: 60vh;
		padding: 6px;
	}

	.shera-suggestion {
		grid-template-columns: 48px 1fr auto;
		gap: 10px;
		padding: 10px;
	}

	.shera-suggestion-img {
		width: 48px;
		height: 48px;
	}

	.shera-suggestion-short {
		display: none;
	}

	.shera-suggestion-name {
		font-size: 13px;
	}

	.shera-suggestion-price {
		font-size: 13px;
		flex-direction: column;
		align-items: flex-end;
		gap: 0;
	}

	.shera-suggestion-price del {
		font-size: 11px;
	}
}

@media (max-width: 575.98px) {
	.sort__box,
	.tea__shop-search,
	.shera-view-toggle {
		width: 100%;
		max-width: 100%;
	}

	.tea__shop-search {
		min-width: 0;
	}
}