/*
Theme Name: Inventory
Author: Inventory
Description: The shared owned theme for Inventory product libraries.
Version: 0.3.0
Requires at least: 6.7
Requires PHP: 8.1
Text Domain: inventory
*/

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
	background: #f9f9f9;
	color: #111;
	overflow-wrap: break-word;
}

a { text-underline-offset: 0.12em; }

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
	outline: 2px solid #111;
	outline-offset: 3px;
}

.screen-reader-text {
	position: absolute !important;
	inline-size: 1px;
	block-size: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.screen-reader-text:focus {
	clip: auto !important;
	inline-size: auto;
	block-size: auto;
	inset-block-start: 1rem;
	inset-inline-start: 1rem;
	z-index: 100000;
	padding: 0.75rem 1rem;
	background: #fff;
	color: #111;
}

.inventory-site-header .wp-block-navigation-item__content { color: #5d5555; }

.inventory-filters {
	display: flex;
	max-inline-size: 1200px !important;
	align-items: center;
	gap: 32px;
	margin-block: 0 !important;
	margin-inline: auto !important;
}

.inventory-filter-group {
	display: flex;
	flex-wrap: nowrap;
	align-items: center;
}

.inventory-filter-group[aria-label="Colour"] { gap: 6px; }
.inventory-filter-group[aria-label="Price"] { gap: 16px; }

.inventory-filter {
	position: relative;
	display: block;
	padding: 0;
	border: 0;
	color: inherit;
	text-decoration: none;
}

.inventory-filter::before {
	position: absolute;
	inset: -10px;
	content: "";
}

.inventory-filter--colour,
.inventory-filter__image {
	display: block;
	inline-size: 20px;
	block-size: 20px;
}

.inventory-filter--price {
	color: #807676;
	font-family: var(--wp--preset--font-family--body);
	font-size: 0.71rem;
	font-weight: 500;
	line-height: 1.55;
}

.inventory-filter[aria-current="page"] { outline: 1px dotted currentColor; outline-offset: 3px; }

.inventory-product-grid {
	inline-size: 100%;
	max-inline-size: 1200px !important;
	margin-inline: auto !important;
}

.inventory-product-grid .wp-block-post-template {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 1.2rem;
}

.inventory-product-card { min-inline-size: 0; }

.inventory-product-card .wp-block-post-featured-image {
	inline-size: 100%;
	margin: 0;
	aspect-ratio: 3 / 4;
	overflow: hidden;
	border-radius: 4px;
}

.inventory-product-card .wp-block-post-featured-image img {
	inline-size: 100%;
	block-size: 100%;
	object-fit: cover;
}

.inventory-product-card .wp-block-post-title {
	margin-block: 1rem 0;
	color: #393636;
	font-family: var(--wp--preset--font-family--body);
	font-size: 1.05rem;
	font-weight: 400;
	line-height: 1.2;
}

.inventory-product-card .wp-block-post-title a { color: inherit; text-decoration: none; }
.inventory-product-card .wp-block-post-title a:hover { text-decoration: underline; }

.inventory-product-main > .wp-block-group,
.inventory-product-main > .wp-block-post-featured-image,
.inventory-product-main .wp-block-post-featured-image {
	inline-size: 100%;
	max-inline-size: 1200px !important;
}

.inventory-product-main .wp-block-post-featured-image img {
	display: block;
	inline-size: 100%;
	block-size: auto;
	border-radius: 4px;
}

.inventory-product-copy {
	max-inline-size: 1200px !important;
	padding-inline: var(--wp--style--root--padding-left) var(--wp--style--root--padding-right) !important;
}

.inventory-product-details {
	inline-size: 100%;
	max-inline-size: 620px;
	margin-inline: auto;
	color: #686363;
	font-family: var(--wp--preset--font-family--body);
	font-size: 0.9rem;
	line-height: 1.55;
}

.inventory-product-details > * { margin-block: 0; }
.inventory-product-details > * + * { margin-block-start: 1rem; }

.inventory-product-details .wp-block-separator {
	inline-size: 100%;
	border: 0 solid #111;
	border-block-end-width: 1px;
	background: #d2d2d2;
}

.inventory-brand-link { color: inherit; text-decoration: none; }
.inventory-brand-link:hover { text-decoration: underline; }

.inventory-product-tags {
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--small);
	line-height: 1.55;
}

.inventory-product-tags a {
	display: inline-block;
	padding: 6px 14px;
	border-radius: 24px;
	background: #fff;
	color: #111;
	text-decoration: none;
}

.inventory-legacy-price-tag a[href$="/tag/black/"],
.inventory-legacy-price-tag a[href$="/tag/white/"],
.inventory-legacy-price-tag a[href$="/tag/colour/"] { display: none; }

.inventory-archive-description { max-inline-size: 1200px !important; }

.wp-block-post-content ul,
.wp-block-post-content ol { padding-inline-start: 1rem; }

.inventory-site-footer { border-block-start: 1px solid #d7d7d7; }

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
}
