/*
 * Foliowick: WooCommerce block styles. Native blocks only; this file changes
 * how they look, never what they do.
 *
 * 1. Shared controls   2. Catalog and filters   3. Book page
 * 4. Reviews           5. Cart, checkout, mini-cart   6. Account   7. Notices
 */

/* ------------------------------------------------------------------ */
/* 1. Shared controls                                                  */
/* ------------------------------------------------------------------ */

/* Bookplate sale badge: a small double-ruled label. */
.wc-block-components-product-sale-badge,
.woocommerce span.onsale {
	padding: 0.3rem 0.55rem;
	border: 1px solid var(--wp--preset--color--sale);
	border-radius: var(--wp--custom--radius--control);
	outline: 1px solid var(--wp--preset--color--paper);
	outline-offset: -4px;
	background: var(--wp--preset--color--sale);
	color: var(--wp--preset--color--on-accent);
	font-size: 0.625rem;
	font-weight: 700;
	letter-spacing: 0.16em;
	line-height: 1.2;
	text-transform: uppercase;
	box-shadow: none;
}

.fo-book__cover .wc-block-components-product-sale-badge {
	inset-block-start: 0.5rem;
	inset-inline-start: auto;
	inset-inline-end: 0.5rem;
	z-index: 2;
}

.wc-block-components-product-rating__stars,
.star-rating {
	color: var(--wp--preset--color--terracotta);
}

.wc-block-components-product-price del,
.price del {
	color: var(--wp--preset--color--muted);
	font-weight: 400;
}

.wc-block-components-product-price ins,
.price ins {
	text-decoration: none;
	color: var(--wp--preset--color--sale);
}

:where(.woocommerce, .wc-block-components-form, .wc-block-checkout, .wc-block-cart, .fo-filters) :where(input[type="text"], input[type="email"], input[type="tel"], input[type="password"], input[type="number"], input[type="search"], textarea, select) {
	border-color: var(--wp--preset--color--line);
	border-radius: var(--wp--custom--radius--control);
	background-color: var(--wp--preset--color--paper);
	color: var(--wp--preset--color--contrast);
}

.woocommerce :where(input.input-text, textarea, select),
.woocommerce-page :where(input.input-text, textarea, select) {
	min-block-size: 2.75rem;
	padding: 0.6rem 0.85rem;
	border: 1px solid var(--wp--preset--color--line);
	border-radius: var(--wp--custom--radius--control);
	background: var(--wp--preset--color--paper);
	font: inherit;
	color: var(--wp--preset--color--contrast);
}

.woocommerce :where(input.input-text, textarea, select):focus {
	border-color: var(--wp--preset--color--accent);
	outline: 2px solid var(--wp--preset--color--accent);
	outline-offset: 0;
}

.woocommerce :where(.button, button.button, a.button, input.button),
.woocommerce-page :where(.button, button.button, a.button) {
	min-block-size: 2.75rem;
	padding: 0.8rem 1.4rem;
	border: 1px solid var(--wp--preset--color--accent);
	border-radius: var(--wp--custom--radius--control);
	background: var(--wp--preset--color--accent);
	color: var(--wp--preset--color--on-accent);
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
	letter-spacing: 0.04em;
	line-height: 1.2;
	text-decoration: none;
}

.woocommerce :where(.button, button.button, a.button, input.button):hover {
	border-color: var(--wp--preset--color--accent-deep);
	background: var(--wp--preset--color--accent-deep);
	color: var(--wp--preset--color--on-accent);
}

.woocommerce .quantity .qty {
	inline-size: 4.5rem;
	min-block-size: 3rem;
	text-align: center;
}

/* ------------------------------------------------------------------ */
/* 2. Catalog and filters                                              */
/* ------------------------------------------------------------------ */

.fo-catalog__head {
	padding-block: var(--wp--preset--spacing--30) var(--wp--preset--spacing--60);
	margin-block-end: var(--wp--preset--spacing--60);
	border-block-end: var(--wp--custom--rule);
}

.fo-catalog__head > * + * {
	margin-block-start: var(--wp--preset--spacing--30);
}

.fo-catalog__crumbs {
	margin-block-end: var(--wp--preset--spacing--50) !important;
}

.woocommerce-breadcrumb,
.wc-block-breadcrumbs {
	font-size: var(--wp--preset--font-size--x-small);
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--wp--preset--color--muted);
}

.woocommerce-breadcrumb a,
.wc-block-breadcrumbs a {
	color: inherit;
	text-decoration: none;
}

.woocommerce-breadcrumb a:hover {
	color: var(--wp--preset--color--contrast);
	text-decoration: underline;
}

.fo-catalog__title {
	margin-block-start: var(--wp--preset--spacing--40) !important;
	font-size: var(--wp--preset--font-size--display) !important;
	line-height: 0.98;
	letter-spacing: -0.035em;
}

.fo-catalog__intro,
.fo-catalog__intro p {
	max-inline-size: 40rem;
	font-family: var(--wp--preset--font-family--heading);
	font-size: var(--wp--preset--font-size--medium);
	font-weight: 300;
	line-height: 1.55;
	color: var(--wp--preset--color--muted);
}

.fo-catalog__intro p {
	margin: 0;
}

/* Author pages: the biography reads like a jacket flap. */
.fo-is-author-archive .fo-catalog__intro {
	padding-inline-start: 1.25rem;
	border-inline-start: 2px solid var(--wp--preset--color--terracotta);
	font-style: italic;
}

.fo-catalog__layout {
	display: grid;
	grid-template-columns: minmax(13rem, 15rem) minmax(0, 1fr);
	align-items: start;
	gap: var(--wp--preset--spacing--70);
}

.fo-catalog__layout > * {
	margin: 0 !important;
}

.fo-catalog__toolbar {
	gap: 1rem;
	margin-block-end: var(--wp--preset--spacing--60) !important;
	padding-block-end: 1rem;
	border-block-end: var(--wp--custom--rule);
	font-size: var(--wp--preset--font-size--small);
}

.fo-catalog__toolbar > * {
	margin: 0 !important;
}

.fo-catalog__toolbar .woocommerce-result-count {
	margin: 0;
	font-family: var(--wp--preset--font-family--heading);
	font-size: var(--wp--preset--font-size--medium);
	font-style: italic;
	color: var(--wp--preset--color--muted);
}

.fo-catalog__toolbar .woocommerce-ordering {
	margin: 0;
}

.fo-catalog__toolbar select.orderby {
	min-block-size: 2.75rem;
	padding-block: 0.5rem;
	padding-inline: 0.85rem 2.25rem;
	border: 1px solid var(--wp--preset--color--line);
	border-radius: var(--wp--custom--radius--control);
	background-color: var(--wp--preset--color--paper);
	font: inherit;
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--contrast);
}

/* Filters: a quiet sidebar with ruled sections. */
.fo-filters {
	position: sticky;
	inset-block-start: calc(var(--fo-sticky-offset, 0px) + 1.5rem);
	font-size: var(--wp--preset--font-size--small);
}

.fo-filters__title {
	margin: 0 0 1rem;
	font-size: var(--wp--preset--font-size--large);
}

.fo-filters .wp-block-woocommerce-product-filter-taxonomy,
.fo-filters .wp-block-woocommerce-product-filter-attribute,
.fo-filters .wp-block-woocommerce-product-filter-price,
.fo-filters .wp-block-woocommerce-product-filter-rating,
.fo-filters .wp-block-woocommerce-product-filter-status {
	margin: 0;
	padding-block: 1.25rem;
	border-block-start: var(--wp--custom--rule);
}

.fo-filter__title {
	margin: 0 0 0.85rem;
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 600;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--wp--preset--color--terracotta-ink);
}

.fo-filters .wc-block-product-filter-checkbox-list__label {
	min-block-size: 2rem;
}

.fo-filters .wc-block-product-filter-checkbox-list__input {
	accent-color: var(--wp--preset--color--accent);
}

.fo-filters .wc-block-product-filter-chips__item {
	min-block-size: 2.25rem;
	border: 1px solid var(--wp--preset--color--line);
	border-radius: var(--wp--custom--radius--pill);
	background: transparent;
	color: var(--wp--preset--color--contrast);
	font-size: var(--wp--preset--font-size--small);
}

.fo-filters .wc-block-product-filter-chips__item[aria-checked="true"] {
	border-color: var(--wp--preset--color--accent);
	background: var(--wp--preset--color--accent);
	color: var(--wp--preset--color--on-accent);
}

.fo-filters .wc-block-product-filter-removable-chips__item {
	border-radius: var(--wp--custom--radius--pill);
	border-color: var(--wp--preset--color--line);
	background: var(--wp--preset--color--paper);
}

.fo-filters .wc-block-product-filter-price-slider input[type="range"] {
	accent-color: var(--wp--preset--color--accent);
}

/* Mobile drawer trigger and panel. */
.fo-filters .wc-block-product-filters__open-overlay {
	align-items: center;
	gap: 0.6rem;
	min-block-size: 2.75rem;
	padding: 0.6rem 1.1rem;
	border: 1px solid var(--wp--preset--color--contrast);
	border-radius: var(--wp--custom--radius--pill);
	background: transparent;
	color: var(--wp--preset--color--contrast);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
}

.fo-filters .wc-block-product-filters__overlay-content,
.fo-filters .wc-block-product-filters__overlay-dialog {
	background: var(--wp--preset--color--base);
	color: var(--wp--preset--color--contrast);
}

.fo-filters .wc-block-product-filters__overlay-footer .wc-block-product-filters__apply {
	background: var(--wp--preset--color--accent);
	color: var(--wp--preset--color--on-accent);
	border-radius: var(--wp--custom--radius--control);
}

.fo-pagination,
.wp-block-query-pagination {
	font-size: var(--wp--preset--font-size--small);
}

@media (max-width: 900px) {

	.fo-catalog__layout {
		grid-template-columns: minmax(0, 1fr);
		gap: var(--wp--preset--spacing--40);
	}

	.fo-filters {
		position: static;
	}
}

@media (min-width: 600px) and (max-width: 900px) {

	/* Between the drawer and the sidebar: filters sit in a compact two-column panel. */
	.fo-filters .wc-block-product-filters__overlay-content {
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		column-gap: var(--wp--preset--spacing--50);
	}

	.fo-filters__title,
	.fo-filters .wp-block-woocommerce-product-filter-active {
		grid-column: 1 / -1;
	}
}

@media (max-width: 600px) {

	.fo-catalog__title {
		font-size: clamp(2.4rem, 10vw, 3.2rem) !important;
	}

	.fo-catalog__toolbar {
		align-items: stretch;
	}

	.fo-catalog__toolbar .woocommerce-ordering,
	.fo-catalog__toolbar select.orderby {
		inline-size: 100%;
	}
}

/* ------------------------------------------------------------------ */
/* 3. Book page: a jacket on a linen table                             */
/* ------------------------------------------------------------------ */

.fo-product__crumbs {
	margin-block-end: var(--wp--preset--spacing--40) !important;
}

.fo-product__hero {
	display: grid;
	grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
	align-items: start;
	gap: var(--wp--preset--spacing--70);
}

.fo-product__hero > * {
	margin: 0 !important;
}

.fo-product__gallery {
	position: sticky;
	inset-block-start: calc(var(--fo-sticky-offset, 0px) + 1.5rem);
	padding: clamp(2rem, 6vw, 5rem) clamp(1.5rem, 6vw, 5rem) clamp(1.5rem, 4vw, 3.5rem);
	background: var(--wp--preset--color--surface);
	isolation: isolate;
}

/* A soft disc of light behind the book. */
.fo-product__gallery::before {
	content: "";
	position: absolute;
	inset-block-start: 8%;
	inset-inline-start: 50%;
	z-index: -1;
	inline-size: 70%;
	aspect-ratio: 1;
	border-radius: 50%;
	background: var(--wp--preset--color--sand);
	opacity: 0.55;
	transform: translateX(-50%);
}

[dir="rtl"] .fo-product__gallery::before {
	transform: translateX(50%);
}

.fo-product__gallery .woocommerce-product-gallery {
	position: relative;
	inline-size: min(100%, 26rem);
	margin-inline: auto;
	opacity: 1 !important;
}

.fo-product__gallery .woocommerce-product-gallery__wrapper {
	margin: 0;
}

.fo-product__gallery .woocommerce-product-gallery__image img {
	inline-size: 100%;
	block-size: auto;
	border-radius: var(--wp--custom--radius--cover);
}

/* A single cover shows the stack of pages; a multi-image slider clips its slides, so it keeps a plain shadow. */
.fo-product__gallery .woocommerce-product-gallery__image {
	box-shadow: var(--wp--preset--shadow--book);
}

.fo-product__gallery .woocommerce-product-gallery:not(:has(.flex-viewport)) .woocommerce-product-gallery__image {
	box-shadow: none;
}

.fo-product__gallery .woocommerce-product-gallery:not(:has(.flex-viewport)) .woocommerce-product-gallery__wrapper {
	box-shadow:
		5px 5px 0 -1px var(--wp--preset--color--paper),
		5px 5px 0 0 var(--wp--preset--color--line),
		10px 10px 0 -1px var(--wp--preset--color--paper),
		10px 10px 0 0 var(--wp--preset--color--line),
		var(--wp--preset--shadow--book),
		0 50px 60px -30px rgba(41, 37, 34, 0.5);
}

.fo-product__gallery .flex-control-thumbs {
	display: flex;
	justify-content: center;
	gap: 0.75rem;
	margin: 2rem 0 0;
	padding: 0;
	list-style: none;
}

.fo-product__gallery .flex-control-thumbs li {
	inline-size: 3.5rem;
	margin: 0;
}

.fo-product__gallery .flex-control-thumbs img {
	opacity: 0.55;
	cursor: pointer;
	box-shadow: var(--wp--preset--shadow--sm);
	transition: opacity var(--wp--custom--transition);
}

.fo-product__gallery .flex-control-thumbs img.flex-active,
.fo-product__gallery .flex-control-thumbs img:hover {
	opacity: 1;
}

.fo-product__gallery .woocommerce-product-gallery__trigger {
	position: absolute;
	inset-block-start: -1rem;
	inset-inline-end: -1rem;
	z-index: 5;
	display: grid;
	place-items: center;
	inline-size: 2.75rem;
	block-size: 2.75rem;
	border-radius: 50%;
	background: var(--wp--preset--color--paper);
	box-shadow: var(--wp--preset--shadow--sm);
	text-indent: -9999px;
	overflow: hidden;
}

.fo-product__gallery .woocommerce-product-gallery__trigger::before {
	content: "";
	inline-size: 0.9rem;
	block-size: 0.9rem;
	border: 2px solid var(--wp--preset--color--contrast);
	border-radius: 50%;
	text-indent: 0;
}

.fo-product__summary > * {
	margin: 0 !important;
}

.fo-product__summary > * + * {
	margin-block-start: var(--wp--preset--spacing--30) !important;
}

.fo-product__genre {
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 600;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--wp--preset--color--terracotta-ink);
}

.fo-product__genre a {
	color: inherit;
	text-decoration: none;
}

.fo-product__title {
	margin-block-start: var(--wp--preset--spacing--40) !important;
	font-size: clamp(2.4rem, 1.6rem + 2.6vw, 4.25rem) !important;
	line-height: 1;
	letter-spacing: -0.03em;
	text-wrap: balance;
}

.fo-product__author {
	margin-block-start: var(--wp--preset--spacing--20) !important;
}

.fo-product__price {
	margin-block-start: var(--wp--preset--spacing--40) !important;
	font-family: var(--wp--preset--font-family--heading);
	font-weight: 400;
}

.fo-product__price .wc-block-components-product-price,
.fo-product__price .price {
	font-weight: 400;
}

.fo-product__excerpt,
.fo-product__excerpt p {
	font-family: var(--wp--preset--font-family--reading);
	font-size: var(--wp--preset--font-size--medium);
	line-height: 1.65;
}

.fo-product__excerpt p {
	margin: 0;
}

/* Add to cart: format choice, quantity and the main action. */
.fo-product__cart {
	margin-block-start: var(--wp--preset--spacing--50) !important;
	padding-block-start: var(--wp--preset--spacing--40);
	border-block-start: var(--wp--custom--rule);
}

.fo-product__cart form.cart {
	display: flex;
	flex-wrap: wrap;
	align-items: stretch;
	gap: 0.75rem;
	margin: 0;
}

.fo-product__cart form.variations_form {
	display: block;
}

.fo-product__cart table.variations {
	inline-size: 100%;
	margin: 0 0 1rem;
	border: 0;
	border-collapse: collapse;
}

.fo-product__cart table.variations tr {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.fo-product__cart table.variations th,
.fo-product__cart table.variations td {
	padding: 0;
	border: 0;
	text-align: start;
}

.fo-product__cart table.variations label {
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 600;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--wp--preset--color--muted);
}

.fo-product__cart table.variations select {
	inline-size: 100%;
	max-inline-size: 22rem;
	min-block-size: 3rem;
}

.fo-product__cart .reset_variations {
	display: inline-block;
	margin-block-start: 0.5rem;
	font-size: var(--wp--preset--font-size--small);
}

.fo-product__cart .single_variation_wrap .woocommerce-variation-price {
	margin-block-end: 0.75rem;
	font-family: var(--wp--preset--font-family--heading);
	font-size: var(--wp--preset--font-size--large);
}

.fo-product__cart .woocommerce-variation-add-to-cart {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
}

/* Sold individually (a single copy): WooCommerce leaves an empty quantity wrapper. */
.fo-product__cart .quantity:has(> input[type="hidden"]) {
	display: none;
}

.fo-product__cart .single_add_to_cart_button {
	flex: 1 1 14rem;
	min-block-size: 3rem;
	font-size: var(--wp--preset--font-size--small);
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.fo-product__cart .stock {
	margin: 0 0 0.75rem;
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--accent);
}

.fo-product__cart .stock.out-of-stock {
	color: var(--wp--preset--color--sale);
}

.fo-product__meta {
	padding-block-start: var(--wp--preset--spacing--30);
	border-block-start: var(--wp--custom--rule);
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--muted);
}

.fo-product__meta > * {
	margin-block: 0.25rem;
}

.fo-product__meta a {
	color: var(--wp--preset--color--contrast);
}

/* Description beside the book's details. */
.fo-product__story {
	display: grid;
	grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
	gap: var(--wp--preset--spacing--70);
	margin-block-start: var(--wp--preset--spacing--80);
	padding-block-start: var(--wp--preset--spacing--60);
	border-block-start: var(--wp--custom--rule);
}

.fo-product__story > * {
	margin: 0 !important;
}

.fo-product__about > * + *,
.fo-product__details > * + * {
	margin-block-start: var(--wp--preset--spacing--40);
}

.fo-product__description {
	max-inline-size: var(--wp--custom--measure);
	font-family: var(--wp--preset--font-family--reading);
	font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.1875rem);
	line-height: 1.75;
}

.fo-product__description p {
	margin-block: 0 1.1em;
}

.fo-product__description h2,
.fo-product__description h3 {
	margin-block: 1.8em 0.5em;
}

/* Details as a quiet ruled table (product attributes only, never invented). */
.fo-specs table,
.fo-specs .wp-block-product-specifications-table,
.woocommerce-product-attributes {
	inline-size: 100%;
	border: 0;
	border-collapse: collapse;
	font-size: var(--wp--preset--font-size--small);
}

.fo-specs tr,
.woocommerce-product-attributes tr {
	border-block-end: var(--wp--custom--rule);
}

.fo-specs th,
.fo-specs td,
.woocommerce-product-attributes th,
.woocommerce-product-attributes td {
	padding: 0.8rem 0;
	border: 0;
	background: transparent !important;
	text-align: start;
	vertical-align: top;
}

.fo-specs th,
.woocommerce-product-attributes th {
	inline-size: 40%;
	padding-inline-end: 1rem;
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 600;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--wp--preset--color--muted);
}

.fo-specs td p,
.woocommerce-product-attributes td p {
	margin: 0;
}

.fo-specs td a {
	color: var(--wp--preset--color--contrast);
}

.fo-related {
	margin-block-start: var(--wp--preset--spacing--80) !important;
}

@media (max-width: 900px) {

	.fo-product__hero,
	.fo-product__story {
		grid-template-columns: minmax(0, 1fr);
		gap: var(--wp--preset--spacing--50);
	}

	.fo-product__gallery {
		position: relative;
		inset-block-start: auto;
	}
}

@media (max-width: 600px) {

	.fo-product__gallery {
		margin-inline: calc(-1 * var(--wp--style--root--padding-left)) calc(-1 * var(--wp--style--root--padding-right)) !important;
	}

	.fo-product__gallery .woocommerce-product-gallery {
		inline-size: min(78%, 20rem);
	}

	.fo-product__title {
		font-size: clamp(2.1rem, 9vw, 2.8rem) !important;
	}
}

/* ------------------------------------------------------------------ */
/* 4. Reviews: real WooCommerce reviews, set like letters to the editor */
/* ------------------------------------------------------------------ */

.fo-product__reviews {
	margin-block-start: var(--wp--preset--spacing--80);
	padding-block-start: var(--wp--preset--spacing--60);
	border-block-start: var(--wp--custom--rule);
}

.fo-product__reviews > * + * {
	margin-block-start: var(--wp--preset--spacing--40);
}

.fo-product__reviews #reviews h2,
.fo-product__reviews .woocommerce-Reviews-title {
	font-size: var(--wp--preset--font-size--x-large);
}

.fo-product__reviews .commentlist {
	margin: 0;
	padding: 0;
	list-style: none;
}

.fo-product__reviews .commentlist li {
	margin: 0;
	padding-block: 1.5rem;
	border-block-end: var(--wp--custom--rule);
}

.fo-product__reviews .comment_container {
	display: flex;
	gap: 1rem;
}

.fo-product__reviews .comment_container img.avatar {
	inline-size: 3rem;
	block-size: 3rem;
	border-radius: 50%;
}

.fo-product__reviews .comment-text .description {
	font-family: var(--wp--preset--font-family--reading);
	font-size: var(--wp--preset--font-size--medium);
}

.fo-product__reviews .woocommerce-noreviews {
	font-family: var(--wp--preset--font-family--heading);
	font-style: italic;
	color: var(--wp--preset--color--muted);
}

.fo-product__reviews #review_form_wrapper {
	margin-block-start: var(--wp--preset--spacing--50);
	padding: var(--wp--preset--spacing--50);
	background: var(--wp--preset--color--paper);
	border: var(--wp--custom--rule);
}

.fo-product__reviews .comment-reply-title {
	display: block;
	font-weight: 300;
	margin-block-end: 1rem;
	font-family: var(--wp--preset--font-family--heading);
	font-size: var(--wp--preset--font-size--large);
}

.fo-product__reviews .comment-form > p {
	margin-block: 0 1rem;
}

.fo-product__reviews .comment-form label {
	display: block;
	margin-block-end: 0.4rem;
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 600;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--wp--preset--color--muted);
}

.fo-product__reviews .comment-form :is(input[type="text"], input[type="email"], textarea) {
	box-sizing: border-box;
	inline-size: 100%;
	padding: 0.7rem 0.85rem;
	border: 1px solid var(--wp--preset--color--line);
	border-radius: var(--wp--custom--radius--control);
	background: var(--wp--preset--color--base);
	font: inherit;
}

.fo-product__reviews .comment-form-cookies-consent label {
	display: inline;
	text-transform: none;
	letter-spacing: 0;
	font-weight: 400;
	font-size: var(--wp--preset--font-size--small);
}

.fo-product__reviews p.stars a {
	color: var(--wp--preset--color--terracotta);
}

/* ------------------------------------------------------------------ */
/* 5. Cart, checkout, order confirmation and the mini-cart drawer      */
/* ------------------------------------------------------------------ */

.fo-cart .fo-page__title,
.fo-checkout .fo-page__title {
	margin-block: var(--wp--preset--spacing--40) var(--wp--preset--spacing--50);
	padding-block-end: var(--wp--preset--spacing--40);
	border-block-end: var(--wp--custom--rule);
}

.wc-block-cart,
.wc-block-checkout {
	font-size: var(--wp--preset--font-size--base);
}

.wc-block-cart .wc-block-cart-items__header,
.wc-block-components-totals-wrapper .wc-block-components-panel__button,
.wc-block-components-checkout-step__title {
	font-family: var(--wp--preset--font-family--body) !important;
	font-size: var(--wp--preset--font-size--x-small) !important;
	font-weight: 600 !important;
	letter-spacing: 0.16em;
	text-transform: uppercase !important;
	color: var(--wp--preset--color--muted);
}

.wc-block-components-checkout-step__title {
	font-family: var(--wp--preset--font-family--heading) !important;
	font-size: var(--wp--preset--font-size--large) !important;
	font-weight: 300 !important;
	letter-spacing: -0.01em;
	text-transform: none !important;
	color: var(--wp--preset--color--contrast);
}

.wc-block-cart-item__product .wc-block-components-product-name {
	font-family: var(--wp--preset--font-family--heading);
	font-size: var(--wp--preset--font-size--medium);
	text-decoration: none;
	color: var(--wp--preset--color--contrast);
}

.wc-block-cart-item__image img,
.wc-block-components-order-summary-item__image img {
	border-radius: var(--wp--custom--radius--cover);
	box-shadow: var(--wp--preset--shadow--md);
}

.wc-block-cart .wc-block-cart__sidebar,
.wc-block-checkout__sidebar .wc-block-components-order-summary,
.wp-block-woocommerce-checkout-order-summary-block {
	border-radius: 0;
}

.wc-block-cart .wc-block-cart__sidebar {
	padding: 0;
}

/* Only the totals are a panel; payment icons and the checkout button sit below it, unframed. */
.wp-block-woocommerce-cart-order-summary-block,
.wp-block-woocommerce-checkout-order-summary-block {
	background: var(--wp--preset--color--paper);
	border: var(--wp--custom--rule) !important;
}

.wp-block-woocommerce-cart-order-summary-block {
	padding: 0.25rem 1.25rem 0.5rem;
}

.wc-block-cart .wc-block-cart__payment-options,
.wc-block-cart .wc-block-cart__submit {
	border: 0 !important;
	background: transparent;
}

.wc-block-cart .wc-block-cart__submit {
	margin-block-start: 1rem;
}

.wp-block-woocommerce-cart .wc-block-cart__totals-title {
	display: block;
	margin: 0 !important;
	padding: 1rem 0 0.75rem !important;
	font-family: var(--wp--preset--font-family--heading) !important;
	font-size: var(--wp--preset--font-size--large) !important;
	font-weight: 300 !important;
	letter-spacing: -0.01em;
	text-align: start;
	text-transform: none !important;
	color: var(--wp--preset--color--contrast);
}

/* Checkout's order summary title matches the cart's. */
.wp-block-woocommerce-checkout-order-summary-block .wc-block-components-checkout-order-summary__title-text {
	font-family: var(--wp--preset--font-family--heading) !important;
	font-size: var(--wp--preset--font-size--large) !important;
	font-weight: 300 !important;
	letter-spacing: -0.01em;
}

/* WooCommerce hides the title in narrow carts; the first row's rule would then double the panel edge. */
@container (max-width: 919px) {

	.wp-block-woocommerce-cart-order-summary-block > .wc-block-cart__totals-title + .wc-block-components-totals-wrapper {
		border-block-start: 0;
	}
}

/* The last totals row closes the panel without a second rule. */
.wp-block-woocommerce-cart-order-summary-block > .wc-block-components-totals-wrapper:last-child {
	border-block-end: 0;
}

/* Phones: WooCommerce pins the checkout button to the bottom of the screen; give that bar the page's paper. */
.wc-block-cart__submit-container--sticky {
	background: var(--wp--preset--color--base) !important;
	box-shadow: 0 -10px 20px -14px rgba(41, 37, 34, 0.35) !important;
}

.wc-block-components-text-input input,
.wc-block-components-combobox .wc-block-components-combobox-control input,
.wc-blocks-components-select .wc-blocks-components-select__select,
.wc-block-components-textarea {
	border-color: var(--wp--preset--color--line) !important;
	border-radius: var(--wp--custom--radius--control) !important;
	background-color: var(--wp--preset--color--paper) !important;
}

.wc-block-components-text-input.is-active input,
.wc-block-components-text-input input:focus {
	border-color: var(--wp--preset--color--accent) !important;
	box-shadow: 0 0 0 1px var(--wp--preset--color--accent) !important;
}

.wc-block-components-button:not(.is-link) {
	min-block-size: 3rem;
	border-radius: var(--wp--custom--radius--control);
	font-weight: 600;
	letter-spacing: 0.06em;
}

.wc-block-components-button:not(.is-link).contained,
.wc-block-cart__submit-button,
.wc-block-components-checkout-place-order-button {
	background: var(--wp--preset--color--accent);
	color: var(--wp--preset--color--on-accent);
	text-transform: uppercase;
}

.wc-block-components-button:not(.is-link).contained:hover,
.wc-block-cart__submit-button:hover,
.wc-block-components-checkout-place-order-button:hover {
	background: var(--wp--preset--color--accent-deep);
	color: var(--wp--preset--color--on-accent);
}

.wc-block-components-radio-control__option,
.wc-block-components-radio-control-accordion-option {
	border-color: var(--wp--preset--color--line) !important;
}

.wc-block-components-radio-control__input:checked,
.wc-block-components-checkbox__input:checked {
	border-color: var(--wp--preset--color--accent) !important;
	background: var(--wp--preset--color--accent) !important;
}

.wc-block-components-totals-footer-item .wc-block-components-totals-item__value,
.wc-block-components-totals-footer-item .wc-block-components-totals-item__label {
	font-family: var(--wp--preset--font-family--heading);
	font-size: var(--wp--preset--font-size--large);
	font-weight: 400;
}

.wc-block-components-sale-badge,
.wc-block-components-product-badge {
	border-color: var(--wp--preset--color--sale);
	border-radius: var(--wp--custom--radius--control);
	color: var(--wp--preset--color--sale);
}

/* Empty cart. */
.wp-block-woocommerce-empty-cart-block .wc-block-cart__empty-cart__title {
	font-family: var(--wp--preset--font-family--heading);
	font-size: var(--wp--preset--font-size--x-large);
	font-weight: 300;
}

/* Order confirmation. */
.wc-block-order-confirmation-status h1,
.woocommerce-order .woocommerce-thankyou-order-received {
	font-family: var(--wp--preset--font-family--heading);
	font-weight: 300;
}

.wc-block-order-confirmation-summary,
.woocommerce-order-overview {
	box-sizing: border-box;
	padding: var(--wp--preset--spacing--40);
	background: var(--wp--preset--color--paper);
	border: var(--wp--custom--rule);
}

.wc-block-order-confirmation-downloads table,
.wc-block-order-confirmation-totals table,
.woocommerce-table {
	border-color: var(--wp--preset--color--line) !important;
}

/* Mini-cart drawer. */
.wc-block-mini-cart__drawer .components-modal__content,
.wc-block-mini-cart__drawer .wc-block-mini-cart__template-part,
.wp-block-woocommerce-mini-cart-contents {
	background: var(--wp--preset--color--base);
	color: var(--wp--preset--color--contrast);
}

.wc-block-mini-cart__title,
.wp-block-woocommerce-mini-cart-title-block {
	font-family: var(--wp--preset--font-family--heading) !important;
	font-size: var(--wp--preset--font-size--x-large) !important;
	font-weight: 300 !important;
}

.wc-block-mini-cart__footer {
	border-block-start: var(--wp--custom--rule);
}

.wc-block-mini-cart__footer-checkout {
	background: var(--wp--preset--color--accent) !important;
	color: var(--wp--preset--color--on-accent) !important;
	border-color: var(--wp--preset--color--accent) !important;
}

.wc-block-mini-cart__footer-cart {
	border-color: var(--wp--preset--color--contrast) !important;
	color: var(--wp--preset--color--contrast) !important;
}

/* ------------------------------------------------------------------ */
/* 6. Account                                                          */
/* ------------------------------------------------------------------ */

.woocommerce-account .fo-prose,
.woocommerce-cart .fo-prose,
.woocommerce-checkout .fo-prose {
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--base);
	line-height: 1.6;
}

.woocommerce-account .fo-prose > p:first-of-type::first-letter {
	float: none;
	margin: 0;
	font: inherit;
	color: inherit;
}

/* Account pages use the wide measure, not the reading column. */
.woocommerce-account .fo-main > .wp-block-post-content.fo-prose,
.woocommerce-account .fo-prose > *,
.woocommerce-account .fo-prose > .woocommerce {
	max-inline-size: var(--wp--style--global--wide-size);
}

.woocommerce-account .woocommerce {
	display: grid;
	grid-template-columns: minmax(12rem, 15rem) minmax(0, 1fr);
	align-items: start;
	gap: var(--wp--preset--spacing--40) var(--wp--preset--spacing--60);
}

/* Notices (and anything else WooCommerce prints first) span both columns. */
.woocommerce-account .woocommerce > * {
	grid-column: 1 / -1;
}

/* WooCommerce's float layout sizes these at 30% and 68% of their grid cells; the grid sizes them here. */
.woocommerce-account .woocommerce > .woocommerce-MyAccount-navigation,
.woocommerce-account .woocommerce > .woocommerce-MyAccount-content {
	float: none;
	inline-size: auto;
	margin: 0;
}

.woocommerce-account .woocommerce > .woocommerce-MyAccount-navigation {
	grid-column: 1;
	position: sticky;
	inset-block-start: calc(var(--fo-sticky-offset, 0px) + 1.5rem);
}

.woocommerce-account .woocommerce > .woocommerce-MyAccount-content {
	grid-column: 2;
}

.woocommerce-account .woocommerce > .woocommerce-notices-wrapper:empty {
	display: none;
}

.woocommerce-account:not(.logged-in) .woocommerce {
	display: block;
	max-inline-size: 64rem;
}

.woocommerce-MyAccount-navigation ul {
	margin: 0;
	padding: 0;
	list-style: none;
	border-block-start: var(--wp--custom--rule);
}

.woocommerce-account .woocommerce-MyAccount-navigation li {
	margin: 0;
	padding: 0;
	border-block-end: var(--wp--custom--rule);
}

.woocommerce-account .woocommerce-MyAccount-navigation a {
	display: block;
	padding-block: 0.8rem;
	font-size: var(--wp--preset--font-size--small);
	text-decoration: none;
	color: var(--wp--preset--color--contrast);
}

.woocommerce-account .woocommerce-MyAccount-navigation li.is-active a {
	text-decoration: none;
	font-family: var(--wp--preset--font-family--heading);
	font-size: var(--wp--preset--font-size--medium);
	font-style: italic;
	color: var(--wp--preset--color--accent);
}

.woocommerce-MyAccount-content > *:first-child {
	margin-block-start: 0;
}

.woocommerce-MyAccount-content {
	font-size: var(--wp--preset--font-size--base);
	line-height: 1.65;
}

.woocommerce-MyAccount-content > p:first-of-type {
	font-family: var(--wp--preset--font-family--heading);
	font-size: var(--wp--preset--font-size--large);
	font-weight: 300;
	line-height: 1.4;
}

.woocommerce-MyAccount-content > p:first-of-type mark {
	background: transparent;
	color: var(--wp--preset--color--accent);
	font-weight: 400;
}

.woocommerce-MyAccount-content > p:first-of-type strong {
	font-weight: 400;
}

/*
 * Two-column sets (login and register, saved addresses, an order's addresses).
 * WooCommerce lays them out with floats at 48% and clearfix pseudo-elements;
 * in a grid those pseudo-elements would take the first cell, so they go.
 */
.woocommerce-account .col2-set {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: var(--wp--preset--spacing--40);
	inline-size: 100%;
}

.woocommerce-account .woocommerce .col2-set::before,
.woocommerce-account .woocommerce .col2-set::after {
	content: none;
	display: none;
}

.woocommerce-account .col2-set > .col-1,
.woocommerce-account .col2-set > .col-2 {
	float: none;
	inline-size: auto;
	max-inline-size: none;
	margin: 0;
	padding: var(--wp--preset--spacing--40);
	background: var(--wp--preset--color--paper);
	border: var(--wp--custom--rule);
}

.woocommerce-account #customer_login > div {
	padding: var(--wp--preset--spacing--50);
}

/* Saved addresses: a ruled header with the title and a quiet edit link. */
.woocommerce-account .woocommerce-Address-title {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: 0.25rem 1rem;
	margin-block-end: 1rem;
	padding-block-end: 0.75rem;
	border-block-end: var(--wp--custom--rule);
}

.woocommerce-account .woocommerce .addresses .woocommerce-Address-title::before,
.woocommerce-account .woocommerce .addresses .woocommerce-Address-title::after {
	content: none;
	display: none;
}

.woocommerce-account :is(.woocommerce-Address-title, .woocommerce-column) :is(h2, h3) {
	margin: 0;
	font-size: var(--wp--preset--font-size--large);
	line-height: 1.2;
}

.woocommerce-account .woocommerce-Address-title .edit {
	float: none;
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 600;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	text-decoration: none;
	border-block-end: 1px solid currentColor;
	white-space: nowrap;
}

.woocommerce-account .woocommerce-column__title {
	margin-block-end: 1rem !important;
	padding-block-end: 0.75rem;
	border-block-end: var(--wp--custom--rule);
}

.woocommerce-account address {
	font-style: normal;
	line-height: 1.7;
}

.woocommerce-account .woocommerce-customer-details {
	margin-block-start: var(--wp--preset--spacing--50);
}

.woocommerce-account .woocommerce-Addresses + *,
.woocommerce-account .woocommerce-MyAccount-content > p:has(+ .woocommerce-Addresses) {
	color: var(--wp--preset--color--muted);
}

.woocommerce-account #customer_login h2 {
	margin-block-start: 0;
	font-size: var(--wp--preset--font-size--x-large);
}

.woocommerce-form-row label,
.woocommerce form .form-row label {
	display: block;
	margin-block-end: 0.4rem;
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 600;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--wp--preset--color--muted);
}

.woocommerce form .form-row input.input-text {
	inline-size: 100%;
}

.woocommerce form .woocommerce-form-login__rememberme {
	text-transform: none;
	letter-spacing: 0;
	font-weight: 400;
}

.woocommerce-account table.shop_table,
.woocommerce table.shop_table {
	inline-size: 100%;
	border: 0;
	border-collapse: collapse;
	font-size: var(--wp--preset--font-size--small);
}

.woocommerce table.shop_table :is(th, td) {
	padding: 0.85rem 0.5rem;
	border: 0;
	border-block-end: var(--wp--custom--rule);
	text-align: start;
}

.woocommerce table.shop_table .woocommerce-orders-table__cell-order-actions .button {
	display: inline-flex;
	align-items: center;
	inline-size: auto;
	min-block-size: 2.25rem;
	margin-block: 0.15rem;
	margin-inline: 0 0.35rem;
	padding: 0.5rem 0.9rem;
	font-size: var(--wp--preset--font-size--x-small);
}

.woocommerce table.shop_table :is(td, th) {
	vertical-align: middle;
}

.woocommerce table.shop_table thead th {
	font-size: var(--wp--preset--font-size--x-small);
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--wp--preset--color--muted);
}

@media (max-width: 782px) {

	.woocommerce-account .woocommerce,
	.woocommerce-account .col2-set {
		grid-template-columns: minmax(0, 1fr);
	}

	.woocommerce-account .woocommerce > .woocommerce-MyAccount-navigation,
	.woocommerce-account .woocommerce > .woocommerce-MyAccount-content {
		grid-column: 1;
	}

	.woocommerce-account .woocommerce > .woocommerce-MyAccount-navigation {
		position: static;
	}

	/* Phones: the account pages become a row of wrapping chips. */
	.woocommerce-account .woocommerce-MyAccount-navigation ul {
		display: flex;
		flex-wrap: wrap;
		gap: 0.5rem;
		margin: 0;
		border: 0;
	}

	.woocommerce-account .woocommerce-MyAccount-navigation li {
		border: 0;
	}

	.woocommerce-account .woocommerce-MyAccount-navigation a {
		display: inline-flex;
		align-items: center;
		min-block-size: 2.5rem;
		padding: 0 1rem;
		border: 1px solid var(--wp--preset--color--line);
		border-radius: var(--wp--custom--radius--pill);
		background: var(--wp--preset--color--paper);
	}

	/* WooCommerce hides row headers in responsive tables, which drops the order number on phones. */
	.woocommerce-account table.shop_table_responsive tbody th.woocommerce-orders-table__cell-order-number {
		display: flex;
		justify-content: space-between;
		padding: 0.85rem 0.5rem;
		text-align: end;
	}

	.woocommerce-account table.shop_table_responsive tbody th.woocommerce-orders-table__cell-order-number::before {
		content: attr(data-title) ": ";
		font-weight: 700;
	}

	.woocommerce-account .woocommerce-MyAccount-navigation li.is-active a {
		border-color: var(--wp--preset--color--accent);
		background: var(--wp--preset--color--accent);
		color: var(--wp--preset--color--on-accent);
		font-family: var(--wp--preset--font-family--body);
		font-size: var(--wp--preset--font-size--small);
		font-style: normal;
	}
}

/* ------------------------------------------------------------------ */
/* 7. Notices                                                          */
/* ------------------------------------------------------------------ */

.wc-block-components-notice-banner {
	border-radius: var(--wp--custom--radius--control);
	border-color: var(--wp--preset--color--line);
	background: var(--wp--preset--color--paper);
	color: var(--wp--preset--color--contrast);
	font-size: var(--wp--preset--font-size--small);
}

.wc-block-components-notice-banner.is-success {
	border-color: var(--wp--preset--color--accent);
}

.wc-block-components-notice-banner.is-success > svg {
	background: var(--wp--preset--color--accent);
}

.wc-block-components-notice-banner.is-info {
	border-color: var(--wp--preset--color--line);
	background: var(--wp--preset--color--paper);
}

.wc-block-components-notice-banner.is-info > svg {
	background: var(--wp--preset--color--accent);
}

.wc-block-components-notice-banner.is-error {
	border-color: var(--wp--preset--color--sale);
}

.wc-block-components-notice-banner.is-error > svg {
	background: var(--wp--preset--color--sale);
}

.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
	position: relative;
	padding-block: 1rem;
	padding-inline: 3rem 1.25rem;
	border: 1px solid var(--wp--preset--color--line);
	border-inline-start: 3px solid var(--wp--preset--color--accent);
	background: var(--wp--preset--color--paper);
	font-size: var(--wp--preset--font-size--small);
	list-style: none;
}

.woocommerce-error {
	border-inline-start-color: var(--wp--preset--color--sale);
}

/* The kit defers the lightbox CSS to the footer: keep its markup hidden until then. */
.pswp {
	display: none;
}

.pswp--open {
	display: block;
}

/* ------------------------------------------------------------------ */
/* 8. Copies: condition, sold-out and forthcoming plates               */
/* ------------------------------------------------------------------ */

.fo-book__condition,
.fo-product__condition {
	font-family: var(--wp--preset--font-family--heading);
	font-size: var(--wp--preset--font-size--small);
	font-style: italic;
	color: var(--wp--preset--color--muted);
}

.fo-book__condition a,
.fo-product__condition a {
	color: inherit;
	text-decoration: none;
}

.fo-product__condition {
	font-size: var(--wp--preset--font-size--medium);
}

.fo-product__condition::before {
	content: "";
	display: inline-block;
	inline-size: 1.5rem;
	block-size: 1px;
	margin-inline-end: 0.6rem;
	vertical-align: middle;
	background: var(--wp--preset--color--terracotta);
}

.fo-book__cover {
	position: relative;
}

/* A bookplate stamped across the foot of the cover. */
.fo-sold {
	position: absolute;
	inset-block-end: 8%;
	inset-inline-start: 50%;
	z-index: 2;
	padding: 0.35rem 0.7rem;
	border: 1px solid var(--wp--preset--color--contrast);
	outline: 1px solid var(--wp--preset--color--paper);
	outline-offset: -4px;
	background: var(--wp--preset--color--paper);
	color: var(--wp--preset--color--contrast);
	font-size: 0.625rem;
	font-weight: 700;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	white-space: nowrap;
	transform: translateX(-50%) rotate(-4deg);
	box-shadow: var(--wp--preset--shadow--sm);
}

/* Forthcoming: the same plate in the accent, with the publication date. */
.fo-sold--soon {
	border-color: var(--wp--preset--color--accent);
	background: var(--wp--preset--color--accent);
	outline-color: var(--wp--preset--color--on-accent-muted);
	color: var(--wp--preset--color--on-accent);
	text-align: center;
	inset-block: 6% auto;
}

.fo-sold--soon small {
	display: block;
	margin-block-start: 0.15rem;
	font-size: 0.5625rem;
	font-weight: 500;
	letter-spacing: 0.12em;
	opacity: 0.85;
}

[dir="rtl"] .fo-sold {
	transform: translateX(50%) rotate(4deg);
}

.wc-block-product.outofstock .fo-book__cover img {
	filter: saturate(0.55);
	opacity: 0.85;
}
