/**
 * Smart Search Popup — BEM styles, mobile-first.
 */

:root {
	--ssp-accent: #000;
	--ssp-overlay-bg: rgba(0, 0, 0, 0.5);
	--ssp-popup-bg: #fff;
	--ssp-popup-radius: 8px;
	--ssp-popup-shadow: 0 4px 24px rgba(0, 0, 0, 0.15);
	--ssp-transition: 250ms ease;
}

/* Overlay */
.ssp-overlay {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: flex-start;
	justify-content: center;
	padding: 0;
	background: var(--ssp-overlay-bg);
	opacity: 0;
	visibility: hidden;
	transition: opacity 200ms ease, visibility 200ms ease;
	overflow-y: auto;
}

.ssp-overlay.ssp-active {
	opacity: 1;
	visibility: visible;
}

/* Popup card */
.ssp-popup {
	position: relative;
	width: 100%;
	max-width: 1024px;
	padding: 2.2rem 1.25rem 0 1.25rem;
	background: var(--ssp-popup-bg);
	box-shadow: var(--ssp-popup-shadow);
	transform: translateY(-20px);
	opacity: 0;
	transition: transform var(--ssp-transition), opacity var(--ssp-transition);
	top: 100px;
}

.ssp-overlay.ssp-active .ssp-popup {
	transform: translateY(0);
	opacity: 1;
}

@media (max-width: 480px) {
	.ssp-popup {
		margin: 0;
		min-height: 100vh;
		border-radius: 0;
	}
}

/* Close button */
.ssp-popup__close,
.ssp-close {
	position: absolute;
	top: 0;
	right: 0.5rem;
	padding: 0;
	border: none;
	background: transparent;
	color: #50575e;
	font-size: 1.75rem;
	line-height: 1;
	cursor: pointer;
	transition: color 150ms ease;
}

.ssp-popup__close:hover,
.ssp-close:hover {
	color: #1d2327;
}

/* Header / search input */
.ssp-popup__header {
	position: relative;
	margin-bottom: 1.5rem;
}

.ssp-popup__input-wrap {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	border-top: 0.1rem solid rgb(232, 232, 232);
	background: #fff;
	transition: border-color 150ms ease, box-shadow 150ms ease;
}

.ssp-popup__input-wrap:focus-within {
	border-color: rgb(232, 232, 232);
}

.ssp-popup__input {
	flex: 1;
	width: 100%;
	min-width: 0;
	padding: 0.75rem 1rem;
	border: none;
	background: transparent;
	font-size: 1rem;
}

.ssp-popup__input::placeholder {
	color: #787c82;
}

.ssp-popup__input:focus {
	outline: none;
}

.ssp-popup__hint {
	padding: 0 0.75rem;
	color: #787c82;
	font-size: 0.8125rem;
}

.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	border: 0;
}

/* Two-column search results panel (Suggestions + Suggested products) */
.ssp-search-results {
	display: none;
}

.ssp-search-results.ssp-search-results--visible {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	border-top: 0.1rem solid rgb(232, 232, 232);
	background: #fff;
	transition: border-color 150ms ease, box-shadow 150ms ease;
}

.ssp-search-results.ssp-search-results--visible ~ .ssp-popup__content {
	display: none;
}

.ssp-search-results__title {
	margin: 0 0 0.75rem;
	font-size: 0.875rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.02em;
	color: #50575e;
}

.ssp-search-results__suggestions .ssp-search-results__title {
	margin-top: 0;
}

.ssp-suggestions-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.ssp-suggestions-list__link {
	display: block;
	padding: 0.5rem 0;
	text-decoration: none;
	color: var(--ssp-accent);
	transition: color 150ms ease;
}

.ssp-suggestions-list__link:hover {
	color: #135e96;
}

.ssp-search-results__products-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	margin-bottom: 0.75rem;
}

.ssp-search-results__products-head .ssp-search-results__title {
	margin: 0;
}

.ssp-search-results__view-all {
	font-size: 0.875rem;
	color: var(--ssp-accent);
	text-decoration: none;
	white-space: nowrap;
}

.ssp-search-results__view-all:hover {
	text-decoration: underline;
}

/* Suggested products — card layout (search results swiper)
.ssp-search-results__products .ssp-search-results-swiper {
	position: relative;
	overflow: hidden;
	margin-bottom: 0.5rem;
	min-height: 200px;
	padding: 0 2.5rem;
}

.ssp-search-results__products .ssp-search-results-swiper .swiper-wrapper {
	align-items: stretch;
}

.ssp-search-results__products .ssp-search-results-swiper .swiper-slide {
	height: auto;
	box-sizing: border-box;
}

.ssp-search-results__products .ssp-search-results-swiper .ssp-product-card--slider {
	position: relative;
	display: flex;
	flex-direction: column;
	height: 100%;
	background: #fff;
	border-radius: 8px;
	border: 1px solid #eee;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
	overflow: hidden;
	text-align: center;
	padding: 0;
	transition: box-shadow 150ms ease, transform 150ms ease;
}

.ssp-search-results__products .ssp-search-results-swiper .ssp-product-card--slider:hover {
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
	transform: translateY(-2px);
}

.ssp-search-results__products .ssp-search-results-swiper .ssp-product-card__badge {
	position: absolute;
	top: 10px;
	left: 0;
	z-index: 1;
	padding: 4px 8px;
	font-size: 0.65rem;
	font-weight: 700;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	background: #333;
	color: #fff;
	border-radius: 0 4px 0 0;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.ssp-search-results__products .ssp-search-results-swiper .ssp-product-card__img,
.ssp-search-results__products .ssp-search-results-swiper .ssp-product-card__img--placeholder {
	display: block;
	width: 100%;
	aspect-ratio: 1;
	object-fit: cover;
	background: #fafafa;
}

.ssp-search-results__products .ssp-search-results-swiper .ssp-product-card__name {
	display: block;
	margin: 0;
	padding: 0.75rem 0.5rem 0.25rem;
	font-size: 1rem;
	font-weight: 600;
	line-height: 1.3;
	color: #333;
	background: transparent;
}

.ssp-search-results__products .ssp-search-results-swiper .ssp-product-card__rating {
	display: block;
	margin: 0.25rem 0;
	padding: 0;
	line-height: 1;
	background: transparent;
}

.ssp-search-results__products .ssp-search-results-swiper .ssp-product-card__rating .ssp-star {
	display: inline-block;
	font-size: 0.875rem;
}

.ssp-search-results__products .ssp-search-results-swiper .ssp-product-card__rating .ssp-star--full,
.ssp-search-results__products .ssp-search-results-swiper .ssp-product-card__rating .ssp-star--half {
	color: #ffc107;
}

.ssp-search-results__products .ssp-search-results-swiper .ssp-product-card__rating .ssp-star--half {
	opacity: 0.85;
}

.ssp-search-results__products .ssp-search-results-swiper .ssp-product-card__rating .ssp-star--empty {
	color: #ccc;
}

.ssp-search-results__products .ssp-search-results-swiper .ssp-product-card__price {
	display: block;
	margin: 0.25rem 0 0.75rem;
	padding: 0 0.5rem;
	font-size: 1rem;
	font-weight: 700;
	color: #333;
	background: transparent;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* Search results products: use same swiper/product style as ssp-section--dreaming 
.ssp-search-results__products .ssp-dreaming-swiper {
	position: relative;
	overflow: hidden;
	margin-bottom: 0.5rem;
	min-height: 180px;
	max-width: 100%;
}

.ssp-search-results__products .ssp-dreaming-swiper .swiper-wrapper {
	align-items: stretch;
	max-width: 100%;
}

.ssp-search-results__products .ssp-dreaming-swiper .swiper-slide {
	width: 220px !important;
	min-width: 220px;
	max-width: 220px;
	height: auto;
	box-sizing: border-box;
	flex-shrink: 0;
}

.ssp-search-results__products .ssp-dreaming-swiper .ssp-product-card__price {
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	max-width: 100%;
	margin-top: 0.35rem;
	font-weight: 600;
	color: var(--ssp-accent);
}

.ssp-search-results__products .ssp-dreaming-swiper .ssp-product-card--slider {
	position: relative;
	display: flex;
	flex-direction: column;
	height: 100%;
	min-height: 180px;
	text-align: center;
}

.ssp-search-results__products .ssp-dreaming-swiper .ssp-product-card__img {
	aspect-ratio: 1;
	object-fit: cover;
}

.ssp-search-results__products .ssp-dreaming-swiper .ssp-product-card__name {
	display: block;
	margin-top: 0.5rem;
	padding: 0 0.25rem;
	font-size: 0.875rem;
	font-weight: 600;
	line-height: 1.3;
	color: #1d2327;
}

.ssp-search-results__products .ssp-dreaming-swiper .ssp-product-card__rating {
	display: block;
	margin-top: 0.35rem;
	line-height: 1;
}

.ssp-search-results__products .ssp-dreaming-swiper .ssp-product-card__rating .ssp-star {
	display: inline-block;
	font-size: 0.875rem;
}

.ssp-search-results__products .ssp-dreaming-swiper .ssp-product-card__rating .ssp-star--full,
.ssp-search-results__products .ssp-dreaming-swiper .ssp-product-card__rating .ssp-star--half {
	color: #f0ad4e;
}

.ssp-search-results__products .ssp-dreaming-swiper .ssp-product-card__rating .ssp-star--half {
	opacity: 0.85;
}

.ssp-search-results__products .ssp-dreaming-swiper .ssp-product-card__rating .ssp-star--empty {
	color: #c3c4c7;
}


.ssp-search-results__products .ssp-dreaming-prev,
.ssp-search-results__products .ssp-dreaming-next {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	margin: 0;
	padding: 0;
	border: none;
	background: transparent;
	color: var(--ssp-accent);
	cursor: pointer;
	z-index: 2;
}

.ssp-search-results__products .ssp-dreaming-prev {
	left: 0;
}

.ssp-search-results__products .ssp-dreaming-next {
	right: 0;
}

.ssp-search-results__products .ssp-dreaming-pagination {
	position: relative;
	margin-top: 0.75rem;
	display: none;
}


.ssp-search-results__products .swiper-slide {
	background: #fff;
	border-radius: 4px;
	overflow: hidden;
}

.ssp-search-results__products .swiper-slide > * {
	background: #fff !important;
	color: inherit;
}

.ssp-search-results__products .swiper-slide .price,
.ssp-search-results__products .swiper-slide .woocommerce-Price-amount,
.ssp-search-results__products .swiper-slide .amount {
	background: transparent !important;
	color: var(--ssp-accent) !important;
} */

.ssp-search-results__scroll.products {
	display: flex;
	flex-wrap: nowrap;
	overflow-x: auto;
	gap: 1rem;
	margin: 0;
	padding: 0 0 0.5rem;
	list-style: none;
	-webkit-overflow-scrolling: touch;
}

.ssp-search-results__scroll.products .product {
	flex: 0 0 auto;
	min-width: 160px;
	max-width: 200px;
}

.ssp-search-results__scroll .ssp-product-card--search {
	position: relative;
	display: flex;
	flex-direction: column;
	text-align: center;
	text-decoration: none;
	color: inherit;
}

.ssp-search-results__scroll .ssp-product-card--search .ssp-product-card__img {
	display: block;
	width: 100%;
	aspect-ratio: 1;
	object-fit: cover;
	background: #f0f0f1;
}

.ssp-search-results__scroll .ssp-product-card--search .ssp-product-card__img--placeholder {
	display: block;
	width: 100%;
	aspect-ratio: 1;
	background: #f0f0f1;
}

.ssp-search-results__scroll .ssp-product-card--search .ssp-product-card__name {
	display: block;
	margin-top: 0.5rem;
	padding: 0 0.25rem;
	font-size: 0.875rem;
	font-weight: 600;
	line-height: 1.3;
	color: #1d2327;
}

.ssp-search-results__scroll .ssp-product-card--search .ssp-product-card__rating {
	display: block;
	margin-top: 0.35rem;
	line-height: 1;
}

.ssp-search-results__scroll .ssp-product-card--search .ssp-product-card__rating .ssp-star {
	display: inline-block;
	font-size: 0.875rem;
}

.ssp-search-results__scroll .ssp-product-card--search .ssp-product-card__rating .ssp-star--full,
.ssp-search-results__scroll .ssp-product-card--search .ssp-product-card__rating .ssp-star--half {
	color: #f0ad4e;
}

.ssp-search-results__scroll .ssp-product-card--search .ssp-product-card__rating .ssp-star--half {
	opacity: 0.85;
}

.ssp-search-results__scroll .ssp-product-card--search .ssp-product-card__rating .ssp-star--empty {
	color: #c3c4c7;
}

.ssp-search-results__scroll .ssp-product-card--search .ssp-product-card__price {
	margin-top: 0.35rem;
	padding: 0 0.25rem;
	font-size: 0.875rem;
	font-weight: 600;
	color: var(--ssp-accent);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

@media (max-width: 640px) {
	.ssp-search-results.ssp-search-results--visible {
		grid-template-columns: 1fr;
	}
}

/* Sections */
.ssp-popup__content {
	display: flex;
	border-top: 0.1rem solid rgb(232, 232, 232);
	overflow-x: hidden;
	min-width: 0;
}


.ssp-section--trending,
.ssp-search-results__suggestions {
	flex: 0 0 30%;
	max-width: 30%;
	align-self: stretch;
	border-right: 0.1rem solid rgb(232, 232, 232);
	margin: 0px;
	height: auto;
	padding: 2rem 1rem;
}
.ssp-section--dreaming,
.ssp-search-results__products {
	padding: 2rem 1rem;
	min-height: 120px;
	overflow: hidden;
	min-width: 0;
}

.ssp-section__title__wrap{
	display: flex;
    align-items: center;
    justify-content: space-between;
	margin: 0 0 0.75rem;
}

.ssp-section__title__wrap .ssp-section__title{
	margin: 0;
}

.ssp-section__title {
	margin: 0 0 0.75rem;
	font-size: 0.875rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.02em;
	color: #50575e;
}

.ssp-section__title__wrap  .ssp-search-results__view-all:hover{
	color: var(--ssp-accent);
}

/* Chips */
.ssp-chips {
	display: inline-grid;
	gap: 0.5rem;
}

.ssp-chip {
	display: inline-block;
	color: #1d2327;
	text-decoration: none;
	font-size: 0.875rem;
	transition: background 150ms ease, color 150ms ease;
}

.ssp-chip:hover {
	text-decoration: underline;
	color: var(--ssp-accent);
}

/* Product grid */
.ssp-product-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 1rem;
}

@media (max-width: 480px) {
	.ssp-product-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 0.75rem;
	}
}

.ssp-product-card {
	display: block;
	text-decoration: none;
	color: inherit;
	border-radius: 4px;
	overflow: hidden;
	transition: transform 150ms ease, box-shadow 150ms ease;
}

.ssp-product-card:hover {
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.ssp-product-card__img {
	display: block;
	width: 100%;
	aspect-ratio: 1;
	object-fit: cover;
	background: #f0f0f1;
}

.ssp-product-card__img--placeholder {
	background: #f0f0f1;
}

.ssp-product-card__name {
	display: block;
	margin-top: 0.5rem;
	padding: 0 0.25rem;
	font-size: 0.875rem;
	line-height: 1.3;
	color: #1d2327;
}

.ssp-product-card__price {
	display: block;
	margin-top: 0.25rem;
	padding: 0 0.25rem;
	font-size: 0.875rem;
	font-weight: 600;
	color: var(--ssp-accent);
}

/* Still Dreaming empty state */
.ssp-section--dreaming .ssp-dreaming-empty {
	display: block;
	margin: 0;
	padding: 1rem 0;
	font-size: 0.875rem;
	color: #787c82;
}

.ssp-dreaming-grid.ssp-has-products .ssp-dreaming-empty {
	display: none;
}

/* Still Dreaming slider (Swiper) — no auto-scroll; manual prev/next only */
.ssp-section--dreaming .ssp-dreaming-swiper {
	position: relative;
	overflow: hidden;
	margin-bottom: 0.5rem;
	min-height: 180px;
	max-width: 100%;
}

.ssp-dreaming-swiper .swiper-wrapper {
	align-items: stretch;
	max-width: 100%;
}

.ssp-dreaming-swiper .swiper-slide {
	width: 220px !important;
	min-width: 220px;
	max-width: 220px;
	height: auto;
	box-sizing: border-box;
	flex-shrink: 0;
}

.ssp-dreaming-swiper .ssp-product-card__price {
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	max-width: 100%;
	margin-top: 0.35rem;
	font-weight: 600;
	color: var(--ssp-accent);
}

.ssp-dreaming-swiper .ssp-product-card--slider {
	position: relative;
	display: flex;
	flex-direction: column;
	height: 100%;
	min-height: 180px;
	text-align: center;
}

.ssp-dreaming-swiper .ssp-product-card__img {
	aspect-ratio: 1;
	object-fit: cover;
}

.ssp-dreaming-swiper .ssp-product-card__name {
	display: block;
	margin-top: 0.5rem;
	padding: 0 0.25rem;
	font-size: 0.875rem;
	font-weight: 600;
	line-height: 1.3;
	color: #1d2327;
}

.ssp-dreaming-swiper .ssp-product-card__rating {
	display: block;
	margin-top: 0.35rem;
	line-height: 1;
}

.ssp-dreaming-swiper .ssp-product-card__rating .ssp-star {
	display: inline-block;
	font-size: 0.875rem;
}

.ssp-dreaming-swiper .ssp-product-card__rating .ssp-star--full {
	color: #f0ad4e;
}

.ssp-dreaming-swiper .ssp-product-card__rating .ssp-star--half {
	color: #f0ad4e;
	opacity: 0.85;
}

.ssp-dreaming-swiper .ssp-product-card__rating .ssp-star--empty {
	color: #c3c4c7;
}


.ssp-dreaming-pagination {
	position: relative;
	margin-top: 0.75rem;
	display: none;
}

.ssp-dreaming-swiper--empty .ssp-dreaming-prev,
.ssp-dreaming-swiper--empty .ssp-dreaming-next,
.ssp-dreaming-swiper--empty .ssp-dreaming-pagination {
	display: none;
}

.ssp-dreaming-prev,
.ssp-dreaming-next {
	color: var(--ssp-accent);
}

.ssp-dreaming-prev:after, 
.ssp-dreaming-next:after{
	font-size: 13px !important;
}

.ssp-product-card__badge {
	position: absolute;
	top: 10px;
	z-index: 1;
	padding: 0.25rem 0.6rem;
	font-size: 0.65rem;
	font-weight: 700;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	background: #1d2327;
	color: #fff;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.ssp-product-card--slider {
	position: relative;
}

/* Elementor widget: Input + Icon search bar (trigger) */
.ssp-search-widget-wrap {
	display: flex;
	align-items: center;
	cursor: pointer;
	outline: none;
}

.ssp-search-widget-wrap .ssp-search-widget-input {
	flex: 1;
	min-width: 0;
	border: none;
	background: transparent;
	outline: none;
	cursor: pointer;
}