/* Prodesign Custom Search – header icon + suggestions panel */

@property --pdcs-angle {
	syntax: "<angle>";
	inherits: false;
	initial-value: 0deg;
}

/* ---------- icon in the header ---------- */

.header ul.nav-right .pdcs-menu-item {
	display: flex;
	align-items: center;
}

.pdcs-toggle {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 24px;
	margin: 24px 0;
	padding: 0;
	border: 0;
	background: none;
	color: #fff;
	cursor: pointer;
	transition: color .2s linear;
}

.pdcs-toggle:hover,
.pdcs-toggle:focus-visible,
.pdcs-toggle[aria-expanded="true"] {
	color: var(--mint-gold, #CDA626);
}

.header .pdcs-toggle .pdcs-icon,
.header .pdcs-toggle .pdcs-icon * {
	color: inherit;
}

/* ---------- panel ---------- */

.pdcs[hidden] {
	display: none !important;
}

.pdcs {
	--pdcs-blue: var(--mint-blue, #0E2E50);
	--pdcs-gold: var(--mint-gold, #CDA626);
	--pdcs-accent: var(--anchor-blue, #38769F);
	--pdcs-muted: #6b7684;
	--pdcs-line: #d5dbe2;
	--pdcs-hover: #f2f5f8;
	position: fixed;
	inset: var(--pdcs-top, 0px) 0 0 0;
	z-index: 9998;
	font-family: var(--fira-sans-condensed-family, "Fira Sans Condensed", sans-serif);
	color: var(--pdcs-blue);
}

.pdcs__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(14, 46, 80, .28);
	backdrop-filter: blur(4px);
	-webkit-backdrop-filter: blur(4px);
	opacity: 0;
	transition: opacity .2s ease-out;
}

.pdcs__dropdown {
	position: absolute;
	top: 0;
	right: var(--pdcs-right, 0px);
	width: 480px;
	max-width: calc(100vw - 16px);
	max-height: calc(100dvh - var(--pdcs-top, 0px) - 16px);
	overflow-y: auto;
	box-sizing: border-box;
	padding: 20px 24px 16px;
	background: #fff;
	border-radius: 0 0 16px 16px;
	box-shadow: 0 18px 40px rgba(14, 46, 80, .22);
	opacity: 0;
	transform: translateY(-8px);
	transition: opacity .2s ease-out, transform .2s ease-out;
}

.pdcs.is-visible .pdcs__backdrop {
	opacity: 1;
}

.pdcs.is-visible .pdcs__dropdown {
	opacity: 1;
	transform: none;
}

/* ---------- search field ---------- */

.pdcs__form {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 0 0 18px;
}

.pdcs__field {
	position: relative;
	flex: 1 1 auto;
	min-width: 0;
	border-radius: 999px;
	isolation: isolate;
}

.pdcs .pdcs__input {
	position: relative;
	z-index: 1;
	display: block;
	width: 100%;
	height: 46px;
	margin: 0;
	box-sizing: border-box;
	padding: 0 82px 0 46px;
	border: 1px solid var(--pdcs-line);
	border-radius: 999px;
	background: #fff;
	color: var(--pdcs-blue);
	font: inherit;
	font-size: 17px;
	line-height: 1.2;
	outline: none;
	box-shadow: none;
	-webkit-appearance: none;
	appearance: none;
	transition: border-color .2s linear;
}

.pdcs .pdcs__input::placeholder {
	color: var(--pdcs-muted);
	opacity: 1;
}

.pdcs .pdcs__input::-webkit-search-cancel-button,
.pdcs .pdcs__input::-webkit-search-decoration {
	-webkit-appearance: none;
	appearance: none;
}

.pdcs .pdcs__input:focus {
	border-color: var(--pdcs-accent);
}

.pdcs__field-icon {
	position: absolute;
	z-index: 2;
	top: 50%;
	left: 16px;
	display: flex;
	color: var(--pdcs-blue);
	transform: translateY(-50%);
	pointer-events: none;
}

.pdcs__field-icon svg {
	width: 20px;
	height: 20px;
}

.pdcs .pdcs__clear {
	position: absolute;
	z-index: 2;
	top: 50%;
	right: 16px;
	margin: 0;
	padding: 4px 0;
	border: 0;
	background: none;
	color: var(--pdcs-blue);
	font: inherit;
	font-size: 13px;
	text-decoration: underline;
	text-underline-offset: 3px;
	cursor: pointer;
	transform: translateY(-50%);
}

.pdcs .pdcs__clear[hidden] {
	display: none;
}

.pdcs .pdcs__clear:hover {
	color: var(--pdcs-accent);
}

/* Running coloured glow along the border while typing:
   ::after = sharp ring (masked to the border), ::before = soft blurred halo behind the field. */
.pdcs__field::before,
.pdcs__field::after {
	content: "";
	position: absolute;
	border-radius: inherit;
	background: conic-gradient(
		from var(--pdcs-angle),
		transparent 0deg,
		#a9d8f0 60deg,
		#5fa8d6 120deg,
		var(--pdcs-accent) 160deg,
		transparent 220deg,
		transparent 360deg
	);
	opacity: 0;
	pointer-events: none;
	transition: opacity .5s ease-out;
	animation: pdcs-spin 2.2s linear infinite;
	animation-play-state: paused;
}

.pdcs__field::before {
	z-index: 0;
	inset: -2px;
	filter: blur(7px);
}

.pdcs__field::after {
	z-index: 3;
	inset: 0;
	padding: 1.5px;
	-webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
	-webkit-mask-composite: xor;
	mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}

.pdcs__field.is-typing::before {
	opacity: .3;
	animation-play-state: running;
	transition-duration: .15s;
}

.pdcs__field.is-typing::after {
	opacity: .85;
	animation-play-state: running;
	transition-duration: .15s;
}

@keyframes pdcs-spin {
	to {
		--pdcs-angle: 360deg;
	}
}

.pdcs .pdcs__close {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: none;
	color: var(--pdcs-blue);
	cursor: pointer;
	transition: background-color .2s linear;
}

.pdcs .pdcs__close:hover,
.pdcs .pdcs__close:focus-visible {
	background: var(--pdcs-hover);
}

/* ---------- heading ---------- */

.pdcs__head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 16px;
	margin: 0 0 8px;
}

.pdcs__title {
	font-size: 18px;
	font-weight: 500;
	color: var(--pdcs-blue);
}

.pdcs .pdcs__all {
	flex: 0 0 auto;
	font-size: 14px;
	color: var(--pdcs-blue);
	text-decoration: underline;
	text-underline-offset: 3px;
}

.pdcs .pdcs__all[hidden] {
	display: none;
}

.pdcs .pdcs__all:hover {
	color: var(--pdcs-accent);
}

/* ---------- rows ---------- */

.pdcs .pdcs__list {
	margin: 0 -8px;
	padding: 0;
	list-style: none;
	transition: opacity .15s linear;
}

.pdcs.is-loading .pdcs__list {
	opacity: .5;
}

.pdcs .pdcs__row {
	margin: 0;
	padding: 0;
	list-style: none;
}

.pdcs .pdcs__row::before,
.pdcs .pdcs__row::marker {
	content: none;
}

.pdcs .pdcs__item {
	display: grid;
	grid-template-columns: 64px minmax(0, 1fr) auto;
	align-items: center;
	gap: 14px;
	padding: 8px;
	border-radius: 10px;
	color: var(--pdcs-blue);
	text-decoration: none;
	transition: background-color .15s linear;
}

.pdcs .pdcs__row[aria-selected="true"] .pdcs__item,
.pdcs .pdcs__item:focus-visible {
	background: var(--pdcs-hover);
}

.pdcs__img {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 64px;
	height: 64px;
	overflow: hidden;
	border-radius: 8px;
	background: #f5f6f8;
}

.pdcs__img img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.pdcs__name {
	display: -webkit-box;
	overflow: hidden;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	line-clamp: 2;
	font-size: 16px;
	line-height: 1.3;
}

.pdcs__name mark {
	padding: 0;
	background: none;
	color: inherit;
	font-weight: 600;
}

.pdcs__price {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 2px;
	font-size: 16px;
	font-weight: 600;
	line-height: 1.2;
	white-space: nowrap;
	text-align: right;
}

.pdcs__price del {
	font-size: 13px;
	font-weight: 400;
	color: var(--pdcs-muted);
}

.pdcs__price ins {
	text-decoration: none;
}

.pdcs__price .screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

.pdcs__stock {
	font-size: 12px;
	font-weight: 400;
	color: var(--pdcs-muted);
}

.pdcs__item.is-out .pdcs__img img {
	opacity: .6;
}

.pdcs__status {
	margin: 8px 0 4px;
	font-size: 15px;
	color: var(--pdcs-muted);
}

.pdcs__status:empty {
	display: none;
}

/* ---------- mobile ---------- */

@media (max-width: 767px) {
	.pdcs__dropdown {
		left: 8px;
		right: 8px;
		width: auto;
		max-width: none;
		padding: 16px 16px 12px;
	}

	.pdcs .pdcs__item {
		grid-template-columns: 56px minmax(0, 1fr) auto;
		gap: 10px;
	}

	.pdcs__img {
		width: 56px;
		height: 56px;
	}

	.pdcs__name {
		font-size: 15px;
	}

	.pdcs__price {
		font-size: 15px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.pdcs__field::before,
	.pdcs__field::after {
		animation: none;
	}

	.pdcs__dropdown,
	.pdcs__backdrop {
		transition: none;
	}
}

/* ---------- results page (?s=...) ----------
   Same markup as a leaf product category; the category grid is laid out next to the filter,
   here there is no filter, so the cards fill the full width. */

body.pdcs-search-page {
	background: #F8F8F8;
}

/* Title like a category page, also when there are no results (no ul.products). */
.pdcs-search-page .post__title {
	font-family: var(--cormorant-family);
	font-weight: 700;
	font-size: 64px;
	line-height: 64px;
}

@media screen and (max-width: 1023px) {
	.pdcs-search-page .post__title {
		font-size: 48px;
		line-height: normal;
		padding-bottom: 30px;
	}
}

.pdcs-search-page .woocommerce:not(:has(> .product-filter-container)) > ul.products {
	display: flex !important;
	flex-wrap: wrap;
	align-items: stretch;
	gap: 25px;
	width: 100%;
	margin: 0;
	padding: 0 0 50px;
}

.pdcs-search-page .woocommerce:not(:has(> .product-filter-container)) > ul.products::before,
.pdcs-search-page .woocommerce:not(:has(> .product-filter-container)) > ul.products::after {
	content: none;
}

.pdcs-search-page ul.products > .woocommerce-pagination,
.pdcs-search-page .woocommerce:not(:has(> .product-filter-container)) > .woocommerce-pagination {
	order: 999;
	width: 100%;
}

.pdcs-search-page .woocommerce:not(:has(> .product-filter-container)) .woocommerce-ordering select {
	width: fit-content;
	float: right;
}

.pdcs-search-page .pdcs-no-results {
	margin: 24px 0 80px;
	font-family: var(--fira-sans-condensed-family, "Fira Sans Condensed", sans-serif);
	font-size: 20px;
	line-height: 1.4;
}

@media screen and (max-width: 1023px) {
	.pdcs-search-page .woocommerce:not(:has(> .product-filter-container)) > ul.products {
		justify-content: center;
	}
}

@media screen and (max-width: 767px) {
	.pdcs-search-page .woocommerce:not(:has(> .product-filter-container)) > ul.products,
	.pdcs-search-page .woocommerce:not(:has(> .product-filter-container)) > ul.products li {
		width: 100% !important;
	}
}
