/* Chobsilk Catalog storefront.
   Black type on white, no accent colour: the cloth is the only colour on the page. */

.chobsilk-eyebrow {
	font-size: 0.75rem;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	margin: 0 0 0.75rem;
}

/* ---- Front page shell ---- */

.home main,
.home .wp-block-post-content {
	margin-top: 0;
	padding-top: 0;
}

.home .wp-block-post-content > * + * {
	margin-block-start: 0;
}

/* ---- Hero ---- */

.chobsilk-hero.wp-block-cover {
	padding: clamp(1.5rem, 5vw, 5rem);
	align-items: flex-end;
}

.chobsilk-hero .wp-block-cover__inner-container {
	max-width: 46rem;
	margin: 0;
	color: #fff;
}

.chobsilk-hero h1 {
	font-size: clamp(2.25rem, 5.2vw, 4.5rem);
	font-weight: 300;
	line-height: 1.04;
	letter-spacing: -0.02em;
	margin: 0 0 1.25rem;
	color: #fff;
}

.chobsilk-hero .chobsilk-lede {
	font-size: clamp(1rem, 1.4vw, 1.25rem);
	line-height: 1.5;
	max-width: 34rem;
	margin: 0 0 2rem;
}

.chobsilk-hero .wp-block-button__link {
	background: #fff;
	color: #111;
	border-radius: 0;
	padding: 1rem 2rem;
	font-size: 0.8125rem;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}

.chobsilk-hero .wp-block-button__link:hover {
	background: #111;
	color: #fff;
}

/* ---- Sections ---- */

.chobsilk-section {
	padding: clamp(3.5rem, 8vw, 7rem) clamp(1.25rem, 4vw, 3rem);
	margin-inline: auto;
}

.chobsilk-section > h2,
.chobsilk-split-text h2 {
	font-size: clamp(1.75rem, 3.2vw, 2.75rem);
	font-weight: 300;
	letter-spacing: -0.015em;
	line-height: 1.1;
	margin: 0 0 2.5rem;
}

.chobsilk-section .is-style-outline .wp-block-button__link,
.chobsilk-split .is-style-outline .wp-block-button__link {
	border: 1px solid #111;
	border-radius: 0;
	background: transparent;
	color: #111;
	padding: 0.9rem 1.75rem;
	font-size: 0.8125rem;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}

.chobsilk-section .is-style-outline .wp-block-button__link:hover,
.chobsilk-split .is-style-outline .wp-block-button__link:hover {
	background: #111;
	color: #fff;
}

/* ---- Category tiles ---- */

.chobsilk-tiles {
	display: grid;
	grid-template-columns: repeat(5, minmax(0, 1fr));
	gap: 1.25rem;
}

.chobsilk-tiles > * {
	margin: 0 !important;
}

.chobsilk-tile {
	position: relative;
}

.chobsilk-tile .wp-block-image {
	margin: 0 0 1rem;
	overflow: hidden;
	aspect-ratio: 4 / 5;
}

.chobsilk-tile .wp-block-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.chobsilk-tile:hover .wp-block-image img {
	transform: scale(1.05);
}

.chobsilk-tile h3 {
	font-size: 1rem;
	font-weight: 500;
	margin: 0 0 0.25rem;
}

.chobsilk-tile h3 a {
	color: inherit;
	text-decoration: none;
}

/* The whole tile is the link, not just the words. */
.chobsilk-tile h3 a::after {
	content: "";
	position: absolute;
	inset: 0;
}

.chobsilk-tile p {
	font-size: 0.875rem;
	color: #6b6b6b;
	margin: 0;
}

/* ---- Facts strip ---- */

.chobsilk-facts {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	border-block: 1px solid #e6e6e6;
	margin: 0;
}

.chobsilk-fact {
	padding: clamp(1.75rem, 3.5vw, 3rem) clamp(1.25rem, 4vw, 3rem);
	margin: 0 !important;
}

.chobsilk-fact + .chobsilk-fact {
	border-inline-start: 1px solid #e6e6e6;
}

.chobsilk-fact h3 {
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	margin: 0 0 0.5rem;
}

.chobsilk-fact p {
	font-size: 0.9375rem;
	color: #4a4a4a;
	margin: 0;
}

/* ---- Product grids (front page and shortcodes) ---- */

.chobsilk-featured .woocommerce ul.products {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 2.75rem 1.25rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

.chobsilk-featured .woocommerce ul.products::before,
.chobsilk-featured .woocommerce ul.products::after {
	content: none;
}

.chobsilk-featured .woocommerce ul.products li.product {
	width: auto;
	float: none;
	margin: 0;
	padding: 0;
	text-align: start;
}

.chobsilk-featured li.product a {
	color: inherit;
	text-decoration: none;
}

.chobsilk-featured li.product img {
	width: 100%;
	aspect-ratio: 4 / 5;
	object-fit: cover;
	display: block;
	margin: 0 0 0.9rem;
}

.chobsilk-featured li.product .woocommerce-loop-product__title {
	font-size: 0.9375rem;
	font-weight: 400;
	line-height: 1.4;
	margin: 0 0 0.35rem;
	padding: 0;
}

.chobsilk-featured li.product .price {
	font-size: 0.875rem;
	color: #6b6b6b;
}

.chobsilk-more {
	margin-top: 3rem;
	justify-content: center;
}

/* ---- Editorial split ---- */

.chobsilk-split {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	align-items: stretch;
	margin: 0;
}

.chobsilk-split > * {
	margin: 0 !important;
}

.chobsilk-split > .wp-block-image img {
	width: 100%;
	height: 100%;
	min-height: 26rem;
	max-height: 44rem;
	object-fit: cover;
	display: block;
}

.chobsilk-split-reverse > .wp-block-image {
	order: 2;
}

.chobsilk-split-text {
	display: flex;
	flex-direction: column;
	justify-content: center;
	padding: clamp(2.5rem, 7vw, 6rem);
}

.chobsilk-split-text h2 {
	margin-bottom: 1.25rem;
}

.chobsilk-split-text p:not(.chobsilk-eyebrow) {
	font-size: 1.0625rem;
	line-height: 1.6;
	color: #4a4a4a;
	max-width: 30rem;
	margin: 0 0 2rem;
}

/* ---- Small screens ---- */

@media (max-width: 900px) {
	.chobsilk-tiles {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.chobsilk-featured .woocommerce ul.products {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.chobsilk-facts,
	.chobsilk-split {
		grid-template-columns: 1fr;
	}

	.chobsilk-fact + .chobsilk-fact {
		border-inline-start: 0;
		border-block-start: 1px solid #e6e6e6;
	}

	.chobsilk-split-reverse > .wp-block-image {
		order: 0;
	}
}

@media (prefers-reduced-motion: reduce) {
	.chobsilk-tile .wp-block-image img {
		transition: none;
	}
}

/* ---- Colour filter on listings ---- */

.chobsilk-tones {
	display: flex;
	align-items: center;
	gap: 1.25rem;
	margin: 0 0 2.5rem;
	padding: 1rem 0;
	border-block: 1px solid #e6e6e6;
}

.chobsilk-tones__label {
	flex: none;
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.18em;
	text-transform: uppercase;
}

.chobsilk-tones ul {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

.chobsilk-tone {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.45rem 0.9rem 0.45rem 0.6rem;
	border: 1px solid #dcdcdc;
	border-radius: 999px;
	font-size: 0.8125rem;
	line-height: 1;
	color: #111;
	text-decoration: none;
	white-space: nowrap;
	transition: border-color 0.2s;
}

.chobsilk-tone:hover {
	border-color: #111;
}

.chobsilk-tone.is-active {
	border-color: #111;
	background: #111;
	color: #fff;
}

.chobsilk-tone:not(:has(.chobsilk-tone__dot)) {
	padding-inline: 0.9rem;
}

.chobsilk-tone__dot {
	width: 1.125rem;
	height: 1.125rem;
	border-radius: 50%;
	/* A hairline so white and ivory still read as a swatch on a white page. */
	box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.14);
}

.chobsilk-tone.is-active .chobsilk-tone__dot {
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.45);
}

.chobsilk-tone__count {
	font-size: 0.6875rem;
	opacity: 0.55;
}

@media (max-width: 900px) {
	.chobsilk-tones {
		flex-direction: column;
		align-items: flex-start;
		gap: 0.75rem;
	}

	/* One row that scrolls sideways, so the products stay near the top of the screen. */
	.chobsilk-tones ul {
		flex-wrap: nowrap;
		overflow-x: auto;
		max-width: 100%;
		padding-bottom: 0.25rem;
		scrollbar-width: none;
	}
}

/* ---- Header ---- */

.chobsilk-header {
	position: sticky;
	top: 0;
	z-index: 50;
	background: #fff;
	border-bottom: 1px solid #e6e6e6;
}

.admin-bar .chobsilk-header {
	top: var(--wp-admin--admin-bar--height, 32px);
}

.chobsilk-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 2rem;
	min-height: 4.25rem;
	padding: 0 clamp(1.25rem, 4vw, 3rem);
}

.chobsilk-brand {
	font-size: 1.0625rem;
	font-weight: 600;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: #111;
	text-decoration: none;
	white-space: nowrap;
	margin: 0;
}

.chobsilk-header ul,
.chobsilk-footer ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.chobsilk-nav ul {
	display: flex;
	gap: clamp(1rem, 2vw, 2rem);
}

.chobsilk-nav a,
.chobsilk-menu nav a {
	font-size: 0.8125rem;
	letter-spacing: 0.06em;
	color: #111;
	text-decoration: none;
	white-space: nowrap;
}

.chobsilk-nav a {
	padding: 0.35rem 0;
	border-bottom: 1px solid transparent;
	transition: border-color 0.2s;
}

.chobsilk-nav a:hover {
	border-bottom-color: #111;
}

.chobsilk-menu {
	display: none;
}

.chobsilk-menu summary {
	list-style: none;
	cursor: pointer;
	width: 2.75rem;
	height: 2.75rem;
	display: grid;
	place-items: center;
	margin-inline-end: -0.6rem;
}

.chobsilk-menu summary::-webkit-details-marker {
	display: none;
}

/* Two bars that cross into an X when the menu is open. */
.chobsilk-menu summary span,
.chobsilk-menu summary span::after {
	display: block;
	width: 1.375rem;
	height: 1.5px;
	background: #111;
	transition: transform 0.25s;
}

.chobsilk-menu summary span {
	transform: translateY(-3.5px);
}

.chobsilk-menu summary span::after {
	content: "";
	transform: translateY(7px);
}

.chobsilk-menu[open] summary span {
	transform: rotate(45deg);
}

.chobsilk-menu[open] summary span::after {
	transform: rotate(-90deg);
}

.chobsilk-menu nav {
	position: absolute;
	inset-inline: 0;
	top: 100%;
	background: #fff;
	border-bottom: 1px solid #e6e6e6;
	padding: 0.5rem clamp(1.25rem, 4vw, 3rem) 1.5rem;
	max-height: calc(100vh - 4.25rem);
	overflow-y: auto;
}

.chobsilk-menu nav a {
	display: block;
	font-size: 1rem;
	padding: 0.9rem 0;
	border-bottom: 1px solid #f0f0f0;
}

@media (max-width: 1100px) {
	.chobsilk-nav {
		display: none;
	}

	.chobsilk-menu {
		display: block;
	}
}

/* ---- Footer ---- */

.chobsilk-footer {
	margin-top: clamp(3rem, 8vw, 7rem);
	border-top: 1px solid #e6e6e6;
	padding: clamp(2.5rem, 6vw, 5rem) clamp(1.25rem, 4vw, 3rem) 2rem;
	font-size: 0.875rem;
}

.home .chobsilk-footer {
	margin-top: 0;
}

.chobsilk-footer__inner {
	display: grid;
	grid-template-columns: 2fr 1fr 1fr;
	gap: 2.5rem;
}

.chobsilk-footer__brand p:last-child {
	color: #6b6b6b;
	margin: 0.75rem 0 0;
}

.chobsilk-footer h2 {
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	margin: 0 0 1rem;
}

.chobsilk-footer li + li {
	margin-top: 0.6rem;
}

.chobsilk-footer a {
	color: #4a4a4a;
	text-decoration: none;
}

.chobsilk-footer a:hover {
	color: #111;
	text-decoration: underline;
}

.chobsilk-footer__legal {
	margin: clamp(2.5rem, 6vw, 4rem) 0 0;
	font-size: 0.75rem;
	color: #8a8a8a;
}

@media (max-width: 700px) {
	.chobsilk-footer__inner {
		grid-template-columns: 1fr 1fr;
	}

	.chobsilk-footer__brand {
		grid-column: 1 / -1;
	}
}

/* ---- Listings: shop, categories, related products ---- */

/* Each tile is already a link to its product. WooCommerce sets the button's
   display itself, and WordPress font-size presets are !important, so these
   three overrides have to be too. */
.wp-block-woocommerce-product-button {
	display: none !important;
}

.wc-block-product-template .wp-block-post-title,
.wc-block-product-template .wp-block-woocommerce-product-price,
.wc-block-product-template .wc-block-components-product-price {
	text-align: start !important;
}

.wc-block-product-template .wp-block-post-title {
	font-size: 0.9375rem !important;
	font-weight: 400;
	line-height: 1.4;
	margin-block: 0.9rem 0.3rem;
}

.wc-block-product-template .wp-block-post-title a {
	text-decoration: none;
}

.wc-block-product-template .wc-block-components-product-price {
	font-size: 0.875rem;
	color: #6b6b6b;
}

.woocommerce-shop .wp-block-query-title,
.tax-product_cat .wp-block-query-title,
.single-product .wp-block-post-title {
	font-weight: 300;
	letter-spacing: -0.015em;
}

@media (max-width: 600px) {
	/* Two to a row: a shopper comparing fabrics needs to see more than one at a time. */
	.wc-block-product-template.wc-block-product-template__responsive {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 1.75rem 0.75rem;
	}

	.wc-block-product-template .wp-block-post-title {
		font-size: 0.8125rem !important;
	}
}
