/*
 * Panel wyszukiwania FJS. Wartości zmierzone na sklepie Shopify (desktop 1310 px), wymiary w px,
 * bo tamten sklep ma html { font-size: 10px }, a Flatsome 16px.
 * Plik jest samowystarczalny: ładuje się na każdej stronie, także tam, gdzie nie ma fjs.css.
 */
@font-face { font-family: "Cabinet Grotesk"; font-weight: 400; font-style: normal; font-display: swap; src: url("fonts/cabinet-grotesk-400.woff2") format("woff2"); }
@font-face { font-family: "Cabinet Grotesk"; font-weight: 500; font-style: normal; font-display: swap; src: url("fonts/cabinet-grotesk-500.woff2") format("woff2"); }
@font-face { font-family: "Cabinet Grotesk"; font-weight: 700; font-style: normal; font-display: swap; src: url("fonts/cabinet-grotesk-700.woff2") format("woff2"); }

.fjs-search, .fjs-search-button {
	--fjs-s-font: "Cabinet Grotesk", "Roboto Condensed", Arial, sans-serif;
	--fjs-s-ease: cubic-bezier(0.7, 0, 0.2, 1);
	--fjs-s-focus: #0b61cd;
	font-family: var(--fjs-s-font);
	font-size: 16px;
	line-height: 26px;
	font-weight: 400;
	color: #000;
	-webkit-font-smoothing: antialiased;
}
.fjs-search, .fjs-search *, .fjs-search *::before, .fjs-search *::after,
.fjs-search-button, .fjs-search-button *, .fjs-search-button *::before, .fjs-search-button *::after { box-sizing: border-box; }

/* Blokada strony: treść nie skacze, bo znikający pasek przewijania jest kompensowany. */
html.fjs-search-lock { overflow: hidden; }
html.fjs-search-lock body, html.fjs-search-lock .header-wrapper.stuck { padding-right: var(--fjs-sbw, 0px); }

/* Dialog: top layer, całe okno, przezroczysty. */
dialog.fjs-search {
	position: fixed;
	inset: 0;
	width: 100vw;
	height: 100dvh;
	max-width: none;
	max-height: none;
	margin: 0;
	padding: 0;
	border: 0;
	background: transparent;
	overflow: hidden;
	color: #000;
}
dialog.fjs-search::backdrop { background: transparent; }

.fjs-search .fjs-search__overlay {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.5);
	opacity: 0;
	transition: opacity 0.8s var(--fjs-s-ease);
}
.fjs-search.is-open .fjs-search__overlay { opacity: 1; }

.fjs-search .fjs-search__inner {
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	display: flex;
	flex-direction: column;
	width: min(460px, 100vw);
	background: #fff;
	box-shadow: none;
	transform: translateX(100%);
	transition: transform 0.6s var(--fjs-s-ease);
}
.fjs-search.is-open .fjs-search__inner { transform: translateX(0); }

/* Reset motywu: listy, nagłówki, linki, przyciski. */
.fjs-search :is(h2, h3, p, ul, li, form) { margin: 0; padding: 0; letter-spacing: normal; text-transform: none; }
.fjs-search ul { list-style: none; }
.fjs-search a { color: inherit; text-decoration: none; box-shadow: none; }
.fjs-search a:hover { color: inherit; }
.fjs-search img { max-width: none; }
.fjs-search svg { display: block; flex: none; }
.fjs-search button {
	margin: 0;
	padding: 0;
	min-height: 0;
	min-width: 0;
	border: 0;
	border-radius: 0;
	background: none;
	box-shadow: none;
	text-shadow: none;
	text-transform: none;
	letter-spacing: normal;
	font-family: inherit;
	font-size: inherit;
	line-height: inherit;
	color: inherit;
	cursor: pointer;
}
.fjs-search button:hover { box-shadow: none; opacity: 1; background: none; color: inherit; }
.fjs-search :is(button, a):focus-visible { outline: 2px solid var(--fjs-s-focus); outline-offset: 2px; }

.fjs-search button.fjs-search__close {
	position: absolute;
	top: 10px;
	right: 10px;
	z-index: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	color: #000;
	transition: background-color 0.3s;
}
.fjs-search button.fjs-search__close:hover { background: rgba(0, 0, 0, 0.06); }
.fjs-search .fjs-search__close svg { width: 20px; height: 20px; }

.fjs-search .fjs-search__header { flex: none; height: 78px; padding: 20px; }
.fjs-search h2.fjs-search__heading {
	margin: 0;
	padding: 0;
	width: auto;
	font-family: var(--fjs-s-font);
	font-size: 28px;
	line-height: 38px;
	font-weight: 700;
	letter-spacing: -0.02em;
	color: #000;
}

.fjs-search .fjs-search__scroll { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.fjs-search .fjs-search__scroll form { padding: 1px 20px 20px; }

/* Pole */
.fjs-search .fjs-search__field { position: relative; }
.fjs-search .fjs-search__field > svg { position: absolute; top: 12px; left: 24px; width: 24px; height: 24px; pointer-events: none; }
.fjs-search input.fjs-search__input {
	display: block;
	width: 100%;
	height: 48px;
	margin: 0;
	padding: 0 24px 0 56px;
	border: 1px solid transparent;
	border-radius: 0;
	background: #f5f5f5;
	box-shadow: none;
	outline: 0;
	font-family: inherit;
	font-size: 16px;
	line-height: 46px;
	color: #000;
	-webkit-appearance: none;
	appearance: none;
	transition: border-color 0.3s, box-shadow 0.3s;
}
.fjs-search input.fjs-search__input:focus { border-color: transparent; background: #f5f5f5; box-shadow: 0 0 0 1px #000; outline: 0; }
.fjs-search input.fjs-search__input::placeholder { color: rgba(0, 0, 0, 0.55); opacity: 1; }
.fjs-search input.fjs-search__input::-webkit-search-cancel-button,
.fjs-search input.fjs-search__input::-webkit-search-decoration { -webkit-appearance: none; display: none; }
/* Miejsce na przycisk „Wyczyść”, żeby tekst pod nim nie znikał. */
.fjs-search input.fjs-search__input:not(:placeholder-shown) { padding-right: 96px; }

.fjs-search button.fjs-search__reset {
	position: absolute;
	top: 0;
	right: 0;
	height: 48px;
	padding: 0 20px;
	border-radius: 24px;
	font-size: 12px;
	line-height: 30px;
	font-weight: 500;
	color: rgba(0, 0, 0, 0.69);
	opacity: 1;
	visibility: visible;
	transition: opacity 0.2s;
}
.fjs-search button.fjs-search__reset:hover { color: #000; opacity: 1; }
.fjs-search input.fjs-search__input:placeholder-shown ~ button.fjs-search__reset { opacity: 0; visibility: hidden; pointer-events: none; transition: opacity 0.2s, visibility 0s 0.2s; }

/* Wyniki */
.fjs-search .fjs-search__results { margin-top: 24px; transition: opacity 0.2s; }
.fjs-search .fjs-search__results:empty { margin-top: 0; }
.fjs-search .fjs-search__results.is-loading { opacity: 0.5; }
.fjs-search .fjs-search__section + .fjs-search__section { margin-top: 24px; padding-top: 24px; border-top: 1px solid #e6e6e6; }
.fjs-search h3.fjs-search__section-title {
	margin: 0 0 12px;
	width: auto;
	font-family: var(--fjs-s-font);
	font-size: 18px;
	line-height: 28px;
	font-weight: 700;
	letter-spacing: -0.02em;
	color: #000;
}

.fjs-search ul.fjs-search__suggest { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.fjs-search .fjs-search__suggest a { display: block; font-size: 16px; line-height: 26px; text-transform: capitalize; }
.fjs-search .fjs-search__suggest a:hover { text-decoration: underline; }

.fjs-search ul.fjs-search__list { display: grid; gap: 16px; }
.fjs-search a.fjs-search__item { display: flex; align-items: center; gap: 12px; min-width: 0; }
.fjs-search .fjs-search__thumb { flex: none; display: block; width: 100px; height: 100px; border-radius: 10px; overflow: hidden; background: #f5f5f5; }
.fjs-search .fjs-search__thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.fjs-search .fjs-search__text { display: grid; flex: 1 1 auto; gap: 4px; min-width: 0; }
.fjs-search .fjs-search__title {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	line-clamp: 2;
	overflow: hidden;
	font-size: 16.96px;
	line-height: 26.96px;
	font-weight: 500;
	color: #000;
}
/* Podkreślenie rośnie od lewej; tytuł jest inline w elemencie z line-clamp. */
.fjs-search .fjs-search__title > span {
	background-image: linear-gradient(#000, #000);
	background-repeat: no-repeat;
	background-position: 0 100%;
	background-size: 0 1px;
	transition: background-size 0.5s cubic-bezier(0.3, 1, 0.3, 1);
}
.fjs-search a.fjs-search__item:hover .fjs-search__title > span,
.fjs-search a.fjs-search__item:focus-visible .fjs-search__title > span { background-size: 100% 1px; }
.fjs-search .fjs-search__price { display: block; font-size: 16px; line-height: 24px; font-weight: 700; color: #000; }
.fjs-search .fjs-search__was { margin-right: 6px; font-weight: 400; text-decoration: line-through; color: rgba(0, 0, 0, 0.55); }

.fjs-search .fjs-search__more { padding-top: 24px; }
.fjs-search button.fjs-search__all {
	display: flex;
	align-items: center;
	gap: 8px;
	width: fit-content;
	font-size: 16px;
	line-height: 25.6px;
	font-weight: 700;
	color: #000;
	text-align: left;
}
.fjs-search .fjs-search__all svg { width: 18px; height: 18px; }
.fjs-search .fjs-search__all:hover span { text-decoration: underline; }

.fjs-search .fjs-search__empty { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 60px 0; text-align: center; }
.fjs-search h3.fjs-search__empty-title { margin: 0; width: auto; font-family: var(--fjs-s-font); font-size: 22px; line-height: 32px; font-weight: 700; letter-spacing: -0.02em; color: #000; }
.fjs-search p.fjs-search__empty-text { font-size: 16px; line-height: 26px; }
.fjs-search p.fjs-search__error { font-size: 16px; line-height: 26px; }

/* Przycisk-wyzwalacz (element buildera) */
button.fjs.fjs-search-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 40px;
	min-width: 0;
	height: 40px;
	min-height: 0;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: none;
	box-shadow: none;
	text-shadow: none;
	text-transform: none;
	letter-spacing: normal;
	font-family: var(--fjs-s-font);
	font-size: 16px;
	line-height: 26px;
	font-weight: 500;
	color: #000;
	cursor: pointer;
	transition: background-color 0.3s;
}
button.fjs.fjs-search-button.has-label { width: auto; padding: 0 14px 0 8px; border-radius: 20px; }
button.fjs.fjs-search-button:hover { background: rgba(0, 0, 0, 0.06); box-shadow: none; opacity: 1; color: #000; }
button.fjs.fjs-search-button:focus-visible { outline: 2px solid var(--fjs-s-focus); outline-offset: 2px; }
button.fjs.fjs-search-button svg { display: block; flex: none; width: 24px; height: 24px; }

@media (max-width: 767px) {
	.fjs-search .fjs-search__header { height: 70px; }
	.fjs-search h2.fjs-search__heading { font-size: 22.4px; line-height: 30px; }
	.fjs-search .fjs-search__thumb { width: 80px; height: 80px; }
	.fjs-search .fjs-search__title { -webkit-line-clamp: 3; line-clamp: 3; }
}

/* !important tylko tu: wyłączenie ruchu ma wygrać z każdą regułą powyżej. */
@media (prefers-reduced-motion: reduce) {
	.fjs-search, .fjs-search *, button.fjs.fjs-search-button { transition: none !important; }
}
