/*
Theme Name: Quicksift Demo
Description: Dark shop + blog theme for the Quicksift Search sandbox: the search sits in the middle of the header, products without photos get coloured tiles.
Version: 0.3.9
Requires at least: 6.4
Requires PHP: 8.1
License: GPL-2.0-or-later
Text Domain: quicksift-demo
*/

:root {
	--qsd-bg: #0d0f14;
	--qsd-surface: #151821;
	--qsd-surface-2: #1c202b;
	--qsd-line: #262b38;
	--qsd-text: #e8eaf0;
	--qsd-muted: #9aa3b5;
	--qsd-accent: #7b93ff;
	--qsd-accent-2: #a78bfa;
	--qsd-ok: #4ade80;
	--qsd-radius: 14px;
	--qsd-wrap: 1240px;

	color-scheme: dark;
}

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	background: var(--qsd-bg);
}

body {
	margin: 0;
	color: var(--qsd-text);
	font: 16px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	background: var(--qsd-bg);
	-webkit-font-smoothing: antialiased;
}

a {
	color: var(--qsd-accent);
	text-decoration: none;
}

a:hover {
	color: #a9b8ff;
}

h1,
h2,
h3,
h4 {
	margin: 0 0 0.5em;
	color: #fff;
	line-height: 1.2;
	letter-spacing: -0.01em;
}

img {
	max-width: 100%;
	height: auto;
}

.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
}

.screen-reader-text:focus {
	top: 8px;
	left: 8px;
	z-index: 100;
	width: auto;
	height: auto;
	padding: 8px 12px;
	clip-path: none;
	background: var(--qsd-surface);
}

.qsd-wrap {
	width: 100%;
	max-width: var(--qsd-wrap);
	margin: 0 auto;
	padding: 0 24px;
}

.qsd-muted {
	color: var(--qsd-muted);
}

/* Header */

.qsd-header {
	position: sticky;
	top: 0;
	z-index: 50;
	background: rgb(13 15 20 / 88%);
	border-bottom: 1px solid var(--qsd-line);
	backdrop-filter: blur(12px);
}

.admin-bar .qsd-header {
	top: 32px;
}

.qsd-header__row {
	display: grid;
	grid-template-columns: auto minmax(0, 600px) auto auto;
	gap: 24px;
	align-items: center;
	justify-content: space-between;
	min-height: 72px;
	padding-top: 10px;
	padding-bottom: 10px;
}

.qsd-brand {
	display: flex;
	gap: 10px;
	align-items: center;
	color: #fff;
	font-weight: 700;
	font-size: 18px;
	white-space: nowrap;
}

.qsd-brand:hover {
	color: #fff;
}

.qsd-brand__mark {
	display: grid;
	width: 34px;
	height: 34px;
	color: #fff;
	font-weight: 800;
	background: linear-gradient(135deg, var(--qsd-accent), var(--qsd-accent-2));
	border-radius: 10px;
	place-items: center;
}

.qsd-header__search {
	width: 100%;
	min-width: 0;
}

.qsd-nav {
	display: flex;
	gap: 4px;
	justify-content: flex-end;
}

.qsd-nav a {
	padding: 8px 12px;
	color: var(--qsd-muted);
	font-size: 15px;
	white-space: nowrap;
	border-radius: 8px;
}

.qsd-nav a:hover,
.qsd-nav a[aria-current="page"] {
	color: #fff;
	background: var(--qsd-surface-2);
}

.qsd-lang {
	display: flex;
	padding: 2px;
	background: var(--qsd-surface);
	border: 1px solid var(--qsd-line);
	border-radius: 8px;
}

.qsd-lang a {
	color: var(--qsd-muted);
	padding: 6px 8px;
	font-size: 13px;
	font-weight: 600;
	border-radius: 6px;
}

.qsd-lang a[aria-current="true"],
.qsd-lang a:hover {
	color: #fff;
	background: var(--qsd-accent);
}

/* Hero */

.qsd-hero {
	padding: 72px 0 56px;
	background:
		radial-gradient(ellipse 60% 70% at 50% 0%, rgb(123 147 255 / 18%), transparent 70%),
		radial-gradient(ellipse 40% 50% at 85% 20%, rgb(167 139 250 / 12%), transparent 70%);
	border-bottom: 1px solid var(--qsd-line);
}

.qsd-hero__inner {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
}

.qsd-eyebrow {
	margin: 0 0 12px;
	padding: 4px 12px;
	color: var(--qsd-accent);
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	background: rgb(123 147 255 / 10%);
	border: 1px solid rgb(123 147 255 / 25%);
	border-radius: 999px;
}

.qsd-hero__title {
	margin: 0 0 16px;
	font-size: clamp(34px, 5vw, 56px);
	letter-spacing: -0.02em;
}

.qsd-hero__lead {
	max-width: 720px;
	margin: 0 0 28px;
	color: var(--qsd-muted);
	font-size: 18px;
}

.qsd-hero__search {
	width: 100%;
	max-width: 720px;
	text-align: left;
}

.qsd-tries {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: center;
	justify-content: center;
	margin: 18px 0 0;
	color: var(--qsd-muted);
	font-size: 14px;
}

.qsd-chip {
	padding: 4px 12px;
	color: var(--qsd-text);
	background: var(--qsd-surface);
	border: 1px solid var(--qsd-line);
	border-radius: 999px;
}

.qsd-chip:hover {
	color: #fff;
	border-color: var(--qsd-accent);
}

.qsd-facts {
	display: flex;
	flex-wrap: wrap;
	gap: 12px 36px;
	justify-content: center;
	margin: 36px 0 0;
	padding: 0;
	color: var(--qsd-muted);
	font-size: 14px;
	list-style: none;
}

.qsd-facts strong {
	display: block;
	color: #fff;
	font-size: 22px;
}

.qsd-host {
	max-width: 720px;
	margin: 28px auto 0;
	padding: 14px 18px;
	color: var(--qsd-muted);
	font-size: 14px;
	line-height: 1.55;
	text-align: left;
	background: var(--qsd-surface);
	border: 1px solid var(--qsd-line);
	border-left: 3px solid var(--qsd-accent);
	border-radius: 10px;
}

.qsd-host strong {
	display: block;
	margin-bottom: 4px;
	color: var(--qsd-text);
}

.qsd-host--shop {
	clear: both;
	max-width: none;
	margin: 4px 0 20px;
	padding: 10px 14px;
	font-size: 13px;
}

.qsd-host--shop strong {
	display: inline;
	margin: 0 6px 0 0;
}

/* Sections */

.qsd-section {
	padding: 48px 0 8px;
}

.qsd-section__head {
	display: flex;
	gap: 16px;
	align-items: baseline;
	justify-content: space-between;
	margin-bottom: 18px;
}

.qsd-section__head h2 {
	margin: 0;
	font-size: 26px;
}

.qsd-cats {
	display: grid;
	grid-template-columns: repeat(6, minmax(0, 1fr));
	gap: 12px;
}

.qsd-cat {
	display: flex;
	flex-direction: column;
	gap: 4px;
	justify-content: space-between;
	min-height: 96px;
	padding: 16px;
	color: #fff;
	background: linear-gradient(145deg, hsl(var(--qsd-hue) 55% 22%), hsl(var(--qsd-hue) 45% 13%));
	border: 1px solid hsl(var(--qsd-hue) 40% 28%);
	border-radius: var(--qsd-radius);
	transition: transform 0.15s, border-color 0.15s;
}

.qsd-cat:hover {
	color: #fff;
	border-color: hsl(var(--qsd-hue) 60% 55%);
	transform: translateY(-2px);
}

.qsd-cat__name {
	font-weight: 600;
	line-height: 1.3;
}

.qsd-cat__count {
	color: hsl(var(--qsd-hue) 60% 80%);
	font-size: 13px;
}

/* Cards */

.qsd-grid {
	display: grid;
	gap: 16px;
}

.qsd-grid--products {
	grid-template-columns: repeat(4, minmax(0, 1fr));
}

.qsd-grid--posts {
	grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
}

.qsd-grid--mixed {
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

.qsd-card {
	display: flex;
	flex-direction: column;
	overflow: hidden;
	color: var(--qsd-text);
	background: var(--qsd-surface);
	border: 1px solid var(--qsd-line);
	border-radius: var(--qsd-radius);
	transition: border-color 0.15s, transform 0.15s;
}

.qsd-card:hover {
	color: var(--qsd-text);
	border-color: #3a4256;
	transform: translateY(-2px);
}

.qsd-card__body {
	display: flex;
	flex: 1;
	flex-direction: column;
	gap: 6px;
	padding: 14px 16px 16px;
}

.qsd-card__meta {
	overflow: hidden;
	color: var(--qsd-muted);
	font-size: 12px;
	white-space: nowrap;
	text-overflow: ellipsis;
}

.qsd-card__title {
	display: -webkit-box;
	overflow: hidden;
	color: #fff;
	font-weight: 600;
	line-height: 1.35;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
}

.qsd-card--post .qsd-card__title {
	font-size: 18px;
}

.qsd-card__text {
	display: -webkit-box;
	overflow: hidden;
	color: var(--qsd-muted);
	font-size: 14px;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
}

.qsd-card__price {
	margin-top: auto;
	color: #fff;
	font-weight: 700;
}

.qsd-card__price del,
.price del {
	margin-right: 6px;
	color: var(--qsd-muted);
	font-weight: 400;
}

.qsd-card__price ins,
.price ins {
	color: var(--qsd-ok);
	text-decoration: none;
}

.qsd-badge {
	align-self: flex-start;
	padding: 2px 8px;
	color: #fca5a5;
	font-size: 12px;
	background: rgb(239 68 68 / 12%);
	border-radius: 6px;
}

/* A product without a photo: its first letter on its category colour. */
.qsd-tile {
	display: grid;
	width: 100%;
	aspect-ratio: 4 / 3;
	color: hsl(var(--qsd-hue) 70% 85%);
	font-weight: 800;
	font-size: 48px;
	background:
		radial-gradient(circle at 30% 20%, hsl(var(--qsd-hue) 60% 32%), transparent 60%),
		linear-gradient(145deg, hsl(var(--qsd-hue) 45% 20%), hsl(var(--qsd-hue) 40% 11%));
	place-items: center;
}

.qsd-tile--icon svg {
	width: 42%;
	height: auto;
}

.qsd-tile.is-woocommerce_single,
.qsd-tile.is-full {
	font-size: 120px;
	border-radius: var(--qsd-radius);
}

/* Pages */

.qsd-page {
	padding-top: 40px;
	padding-bottom: 56px;
}

.qsd-page__head {
	margin-bottom: 24px;
}

.qsd-page__head h1 {
	font-size: clamp(28px, 4vw, 40px);
}

.qsd-page__head .qsd-muted {
	margin: 0;
}

.qsd-article {
	max-width: 800px;
}

.qsd-content {
	font-size: 17px;
	line-height: 1.75;
}

.qsd-content h2 {
	margin-top: 1.6em;
	font-size: 26px;
}

.qsd-content h3 {
	margin-top: 1.4em;
	font-size: 20px;
}

.qsd-content table {
	width: 100%;
	border-collapse: collapse;
}

.qsd-content th,
.qsd-content td {
	padding: 6px 10px;
	border: 1px solid var(--qsd-line);
}

.qsd-content blockquote {
	margin: 1.5em 0;
	padding: 4px 20px;
	color: var(--qsd-muted);
	border-left: 3px solid var(--qsd-accent);
}

.qsd-content code,
.qsd-content pre {
	background: var(--qsd-surface);
	border-radius: 6px;
}

.pagination,
.woocommerce-pagination {
	margin-top: 32px;
}

.nav-links,
.woocommerce-pagination ul {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	justify-content: center;
	margin: 0;
	padding: 0;
	list-style: none;
}

.page-numbers {
	display: inline-block;
	min-width: 40px;
	padding: 8px 12px;
	color: var(--qsd-text);
	text-align: center;
	background: var(--qsd-surface);
	border: 1px solid var(--qsd-line);
	border-radius: 8px;
}

.page-numbers.current {
	color: #fff;
	background: var(--qsd-accent);
	border-color: var(--qsd-accent);
}

.page-numbers.dots {
	background: none;
	border: 0;
}

/* WooCommerce */

.woocommerce-breadcrumb {
	margin-bottom: 12px;
	color: var(--qsd-muted);
	font-size: 14px;
}

.woocommerce-products-header__title {
	font-size: clamp(28px, 4vw, 40px);
}

.woocommerce-result-count {
	float: left;
	margin: 0 0 20px;
	color: var(--qsd-muted);
}

.woocommerce-ordering {
	float: right;
	margin: 0 0 20px;
}

select,
input[type="text"],
input[type="search"],
input[type="number"],
input[type="email"] {
	padding: 8px 12px;
	color: var(--qsd-text);
	font: inherit;
	background: var(--qsd-surface);
	border: 1px solid var(--qsd-line);
	border-radius: 8px;
}

ul.products {
	display: grid;
	clear: both;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 16px;
	margin: 0;
	padding: 0;
	list-style: none;
}

ul.products li.product {
	display: flex;
	flex-direction: column;
	overflow: hidden;
	background: var(--qsd-surface);
	border: 1px solid var(--qsd-line);
	border-radius: var(--qsd-radius);
	transition: border-color 0.15s, transform 0.15s;
}

ul.products li.product:hover {
	border-color: #3a4256;
	transform: translateY(-2px);
}

ul.products li.product > a {
	display: flex;
	flex: 1;
	flex-direction: column;
	color: var(--qsd-text);
}

ul.products li.product .woocommerce-loop-product__title {
	display: -webkit-box;
	margin: 14px 16px 6px;
	overflow: hidden;
	color: #fff;
	font-size: 15px;
	line-height: 1.35;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
}

ul.products li.product .price {
	display: block;
	margin: auto 16px 12px;
	color: #fff;
	font-weight: 700;
}

ul.products li.product .button {
	margin: 0 16px 16px;
}

.button,
button,
input[type="submit"] {
	display: inline-block;
	padding: 8px 14px;
	color: #fff;
	font: inherit;
	font-size: 14px;
	text-align: center;
	background: var(--qsd-surface-2);
	border: 1px solid var(--qsd-line);
	border-radius: 8px;
	cursor: pointer;
}

.button:hover,
button:hover {
	color: #fff;
	border-color: var(--qsd-accent);
}

.onsale {
	position: absolute;
	margin: 10px;
	padding: 2px 8px;
	color: #0d0f14;
	font-size: 12px;
	font-weight: 700;
	background: var(--qsd-ok);
	border-radius: 6px;
}

li.product,
.product .woocommerce-product-gallery {
	position: relative;
}

.single-product div.product {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	gap: 40px;
}

.single-product div.product .woocommerce-tabs,
.single-product div.product .related,
.single-product div.product .upsells {
	grid-column: 1 / -1;
}

.single-product .product_title {
	font-size: clamp(22px, 2.4vw, 30px);
}

.woocommerce-product-gallery {
	margin: 0;
}

.single-product .summary .price {
	font-size: 26px;
	font-weight: 700;
}

.product_meta {
	display: flex;
	flex-direction: column;
	gap: 4px;
	color: var(--qsd-muted);
	font-size: 14px;
}

.woocommerce-tabs ul.tabs {
	display: flex;
	gap: 6px;
	margin: 0 0 16px;
	padding: 0;
	list-style: none;
	border-bottom: 1px solid var(--qsd-line);
}

.woocommerce-tabs ul.tabs li a {
	display: block;
	padding: 10px 14px;
	color: var(--qsd-muted);
}

.woocommerce-tabs ul.tabs li.active a {
	color: #fff;
	box-shadow: inset 0 -2px 0 var(--qsd-accent);
}

.woocommerce-Tabs-panel {
	max-width: 800px;
}

.shop_attributes {
	border-collapse: collapse;
}

.shop_attributes th,
.shop_attributes td {
	padding: 6px 12px;
	text-align: left;
	border-bottom: 1px solid var(--qsd-line);
}

.shop_attributes td p {
	margin: 0;
}

.star-rating {
	color: #fbbf24;
}

.woocommerce-info,
.woocommerce-message,
.woocommerce-error {
	margin: 0 0 20px;
	padding: 12px 16px;
	list-style: none;
	background: var(--qsd-surface);
	border: 1px solid var(--qsd-line);
	border-radius: 10px;
}

/* The demo note at the bottom: quiet, not a purple bar. */
.woocommerce-store-notice,
p.demo_store {
	position: fixed;
	right: 16px;
	bottom: 16px;
	left: 16px;
	z-index: 60;
	max-width: 960px;
	margin: 0 auto;
	padding: 10px 44px 10px 16px;
	color: var(--qsd-muted);
	font-size: 13px;
	line-height: 1.5;
	background: rgb(21 24 33 / 94%);
	border: 1px solid var(--qsd-line);
	border-radius: 10px;
	box-shadow: 0 10px 30px rgb(0 0 0 / 40%);
	backdrop-filter: blur(8px);
}

.woocommerce-store-notice__dismiss-link {
	position: absolute;
	top: 8px;
	right: 12px;
	overflow: hidden;
	width: 24px;
	color: var(--qsd-muted);
	font-size: 0;
}

.woocommerce-store-notice__dismiss-link::before {
	font-size: 18px;
	content: "×";
}

/* Footer */

.qsd-footer {
	margin-top: 64px;
	padding: 40px 0 96px;
	color: var(--qsd-muted);
	font-size: 14px;
	background: #0a0c10;
	border-top: 1px solid var(--qsd-line);
}

.qsd-footer__row {
	display: grid;
	grid-template-columns: 2fr 2fr 1fr;
	gap: 32px;
}

.qsd-footer__title {
	color: #fff;
}

.qsd-footer p {
	margin: 6px 0 0;
}

/* Narrow screens */

@media (max-width: 960px) {

	.qsd-header__row {
		grid-template-columns: auto minmax(0, 1fr) auto;
	}

	.qsd-header__search {
		grid-row: 2;
		grid-column: 1 / -1;
	}

	.qsd-nav {
		grid-column: 2;
	}

	.single-product div.product,
	.qsd-footer__row {
		grid-template-columns: minmax(0, 1fr);
	}

	.qsd-cats {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.qsd-grid--products {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

@media (max-width: 600px) {

	.qsd-wrap {
		padding: 0 16px;
	}

	.qsd-header {
		position: static;
	}

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

	.qsd-brand {
		grid-row: 1;
		grid-column: 1;
	}

	.qsd-lang {
		grid-row: 1;
		grid-column: 2;
	}

	.qsd-nav {
		grid-row: 3;
		grid-column: 1 / -1;
		justify-content: flex-start;
		overflow-x: auto;
	}

	.qsd-hero {
		padding: 40px 0 36px;
	}

	.qsd-hero__lead {
		font-size: 16px;
	}

	.home .qsd-header__search {
		display: none;
	}

	.qsd-facts {
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.woocommerce-store-notice,
	p.demo_store {
		right: 8px;
		bottom: 8px;
		left: 8px;
		font-size: 12px;
	}

	.qsd-grid--posts {
		grid-template-columns: minmax(0, 1fr);
	}

	.qsd-grid--products,
	.qsd-grid--mixed,
	ul.products {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 10px;
	}

	.qsd-cats {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.qsd-tile {
		font-size: 36px;
	}
}

@media (max-width: 782px) {

	.admin-bar .qsd-header {
		top: 46px;
	}
}
