/*
Theme Name: Bookshop
Author: Mehedi Hasan
Description: Classic, minimal Bangla book store block theme for WooCommerce.
Requires at least: 6.7
Requires PHP: 7.4
Version: 2.2
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: bookshop
*/

:root {
	--bs-border: 1px solid var(--wp--preset--color--accent-6);
	--bs-radius: 8px;
	--bs-shadow-hover: 0 2px 4px rgb(16 24 40 / 0.06), 0 10px 28px rgb(16 24 40 / 0.1);
}

/* ---------- Base (carried over from Twenty Twenty-Five) ---------- */
a {
	text-decoration-thickness: 1px !important;
	text-underline-offset: 0.1em;
}
:where(.wp-site-blocks *:focus) {
	outline-width: 2px;
	outline-style: solid;
}
.wp-block-navigation .wp-block-navigation-submenu .wp-block-navigation-item:not(:last-child) {
	margin-bottom: 3px;
}
.wp-block-navigation .wp-block-navigation-item .wp-block-navigation-item__content {
	outline-offset: 4px;
}
.wp-block-navigation .wp-block-navigation-item ul.wp-block-navigation__submenu-container .wp-block-navigation-item__content {
	outline-offset: 0;
}
h1, h2, h3, h4, h5, h6, blockquote, caption, figcaption, p {
	text-wrap: pretty;
}
.more-link {
	display: block;
}
:where(pre) {
	overflow-x: auto;
}

/* Keep it calm: no motion, except the cart drawer's slide (WooCommerce turns that off for reduced-motion users)
   and the add-to-cart label swap, which WooCommerce needs to finish before it updates the in-cart count. */
:where(*:not(.wc-block-components-drawer, .wc-block-components-drawer__screen-overlay, .wc-block-slide-in, .wc-block-slide-out)),
*::before,
*::after {
	transition: none !important;
	animation: none !important;
}

.bookshop-card {
	background: var(--wp--preset--color--accent-5);
	border: var(--bs-border);
	border-radius: var(--bs-radius);
}

/* Focus ring for keyboard users only, not on mouse click. */
.wp-site-blocks :focus:not(:focus-visible) {
	outline: none;
}

/* ---------- Header ---------- */
/* Show the logo or the site title, not both. */
.bookshop-header {
	border-bottom: var(--bs-border);
}
.bookshop-header :has(> .wp-block-site-logo) > .wp-block-site-title {
	display: none;
}
.bookshop-bar {
	align-items: center;
}
.bookshop-bar-end {
	flex: 0 1 460px;
}
.bookshop-search {
	flex: 1;
}
.bookshop-header .wp-block-search__inside-wrapper {
	width: 100% !important;
	border: var(--bs-border);
	border-radius: 6px;
	box-sizing: border-box;
	height: 44px;
	padding: 3px;
	align-items: stretch;
	background: var(--wp--preset--color--accent-5);
}
.bookshop-header .wp-block-search__inside-wrapper:focus-within {
	border-color: var(--wp--preset--color--accent-1);
	background: var(--wp--preset--color--base);
	box-shadow: 0 0 0 3px var(--wp--preset--color--accent-2);
}
.bookshop-header .wp-block-search__input {
	border: 0;
	background: transparent;
	min-height: 0;
	padding: 0 0.8rem;
	font-size: var(--wp--preset--font-size--small);
	outline: none;
}
.bookshop-header .wp-block-search__button {
	border-radius: 4px;
	width: 44px;
	padding: 0;
	display: grid;
	place-items: center;
}
.bookshop-header .wp-block-search__button svg {
	width: 20px;
	height: 20px;
	fill: currentColor;
}

/* Live search dropdown (assets/live-search.js). */
.bookshop-header .wp-block-search {
	position: relative;
}
.bookshop-search__results {
	position: absolute;
	top: calc(100% + 6px);
	left: 0;
	right: 0;
	z-index: 100;
	max-height: 70vh;
	overflow-y: auto;
	padding: 0.35rem;
	background: var(--wp--preset--color--base);
	border: var(--bs-border);
	border-radius: var(--bs-radius);
	box-shadow: 0 12px 32px rgb(17 24 39 / 0.12);
}
.bookshop-search__results a {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	padding: 0.5rem;
	border-radius: 6px;
	color: var(--wp--preset--color--contrast);
	text-decoration: none;
}
.bookshop-search__results a:hover,
.bookshop-search__results a:focus {
	background: var(--wp--preset--color--accent-5);
	outline: none;
}
.bookshop-search__results img {
	flex: none;
	width: 40px;
	height: 52px;
	object-fit: cover;
	border-radius: 3px;
	background: var(--wp--preset--color--accent-5);
}
.bookshop-search__results strong {
	display: block;
	font-weight: 500;
	line-height: 1.4;
}
.bookshop-search__results .price {
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
	color: var(--wp--preset--color--accent-1);
}
.bookshop-search__results .price del {
	font-weight: 400;
	color: var(--wp--preset--color--accent-4);
}
.bookshop-search__results .price ins {
	text-decoration: none;
}
a.bookshop-search__all {
	justify-content: center;
	margin-top: 0.25rem;
	border-top: var(--bs-border);
	border-radius: 0 0 6px 6px;
	font-size: var(--wp--preset--font-size--small);
	font-weight: 500;
	color: var(--wp--preset--color--accent-1);
}
.bookshop-search__empty {
	margin: 0;
	padding: 0.75rem;
	text-align: center;
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--accent-4);
}

/* Search toggle (phones only) + account + cart: 40px tap targets. */
.bookshop-search-toggle {
	border: 0;
	background: none;
	cursor: pointer;
}
.bookshop-search-toggle svg {
	width: 22px;
	height: 22px;
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
	stroke-linecap: round;
}
.bookshop-search-toggle,
.bookshop-actions > * > a,
.bookshop-actions .wc-block-mini-cart__button {
	display: grid;
	place-items: center;
	width: 40px;
	height: 40px;
	padding: 0;
	border-radius: 50%;
	color: var(--wp--preset--color--contrast);
}
.bookshop-search-toggle:hover,
.bookshop-actions > * > a:hover,
.bookshop-actions .wc-block-mini-cart__button:hover {
	background: var(--wp--preset--color--accent-5);
}
.bookshop-actions .wc-block-mini-cart__badge {
	background: var(--wp--preset--color--accent-1) !important;
	color: #fff !important;
	border: 2px solid var(--wp--preset--color--base);
}

@media (min-width: 782px) {
	.bookshop-search-toggle {
		display: none !important;
	}
}

/* Category nav: one row, swipe on small screens. */
.bookshop-nav .wp-block-navigation__container {
	flex-wrap: nowrap;
	overflow-x: auto;
	scrollbar-width: none;
	white-space: nowrap;
}
.bookshop-nav a {
	display: block;
	padding: 0.7rem 0;
	box-shadow: inset 0 -2px 0 transparent;
	text-decoration: none !important;
}
.bookshop-nav a:hover,
.bookshop-nav a[aria-current="page"] {
	color: var(--wp--preset--color--accent-1);
	box-shadow: inset 0 -2px 0 var(--wp--preset--color--accent-1);
}

@media (max-width: 781px) {
	.bookshop-header .site-logo-img,
	.bookshop-header .wp-block-site-logo img {
		max-width: 88px;
	}
	/* One row: ☰ menu, logo, then search toggle + account + cart. The search box drops in below when toggled. */
	.bookshop-bar > :first-child,
	.bookshop-bar-end {
		display: contents !important; /* beats core's .is-layout-flex */
	}
	.bookshop-nav {
		order: 1;
	}
	.bookshop-bar .wp-block-site-logo,
	.bookshop-bar .wp-block-site-title {
		order: 2;
		margin-right: auto;
	}
	.bookshop-actions {
		order: 3;
	}
	.bookshop-search {
		order: 4;
		display: none;
		flex-basis: 100%;
	}
	.bookshop-header.is-search-open .bookshop-search {
		display: block;
	}
	.bookshop-bar {
		gap: 0.6rem 0.25rem !important;
		padding-top: 0.6rem !important;
		padding-bottom: 0.6rem !important;
	}
	.bookshop-header.is-search-open .bookshop-search-toggle {
		background: var(--wp--preset--color--accent-5);
	}
	.bookshop-nav .wp-block-navigation__responsive-container-open {
		display: grid;
		place-items: center;
		width: 40px;
		height: 40px;
		margin-left: -8px;
	}
	.bookshop-nav .wp-block-navigation__responsive-container-open svg {
		width: 26px;
		height: 26px;
	}
	/* Open menu: a plain vertical list. */
	.bookshop-nav .is-menu-open .wp-block-navigation__container {
		flex-direction: column;
		align-items: stretch !important;
		gap: 0 !important;
		width: 100%;
		overflow: visible;
		white-space: normal;
	}
	.bookshop-nav .is-menu-open .wp-block-navigation-item {
		border-bottom: var(--bs-border);
	}
	.bookshop-nav .is-menu-open a {
		padding: 0.9rem 0 !important;
		font-size: var(--wp--preset--font-size--large);
		box-shadow: none !important;
	}
}

/* Core switches the menu to a hamburger only below 600px; do it up to our 781px phone layout. */
@media (min-width: 600px) and (max-width: 781px) {
	.bookshop-nav .wp-block-navigation__responsive-container-open:not(.always-shown) {
		display: grid;
	}
	.bookshop-nav .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) {
		display: none;
	}
}

/* ---------- Hero ---------- */
.bookshop-hero {
	background: var(--wp--preset--color--accent-5);
}
.bookshop-hero h1 {
	font-family: var(--wp--preset--font-family--noto-serif-bengali);
	font-weight: 700;
	line-height: 1.35;
}
.bookshop-pill {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	background: var(--wp--preset--color--accent-2);
	color: var(--wp--preset--color--accent-1);
	border-radius: 999px;
	padding: 0.2rem 0.9rem;
	font-weight: 500;
}
.bookshop-pill::before {
	content: "";
	width: 16px;
	height: 16px;
	background: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M2 4h6a4 4 0 0 1 4 4v13a3 3 0 0 0-3-3H2zM22 4h-6a4 4 0 0 0-4 4v13a3 3 0 0 1 3-3h7z'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M2 4h6a4 4 0 0 1 4 4v13a3 3 0 0 0-3-3H2zM22 4h-6a4 4 0 0 0-4 4v13a3 3 0 0 1 3-3h7z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.bookshop-arrow a::after,
.bookshop-viewall a::after {
	content: " →";
}
.bookshop-arrow a {
	padding: 0.8rem 1.8rem;
}

/* ---------- Trust bar ---------- */
.bookshop-trust {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	margin-block: 0;
	padding: 0;
	list-style: none;
}
.bookshop-trust li {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.9rem;
	padding: 0.25rem 1rem;
}
.bookshop-trust li + li {
	border-left: var(--bs-border);
}
.bookshop-trust svg {
	flex: none;
	box-sizing: border-box;
	width: 60px;
	height: 60px;
	padding: 17px;
	border-radius: 50%;
	background: var(--wp--preset--color--accent-2);
	stroke: var(--wp--preset--color--accent-1);
	fill: none;
	stroke-width: 1.6;
	stroke-linecap: round;
	stroke-linejoin: round;
}
.bookshop-trust p {
	margin: 0;
	font-size: var(--wp--preset--font-size--x-small);
	line-height: 1.5;
	color: var(--wp--preset--color--accent-4);
}
.bookshop-trust strong {
	display: block;
	font-size: var(--wp--preset--font-size--medium);
	font-weight: 600;
	color: var(--wp--preset--color--contrast);
}
@media (max-width: 900px) {
	.bookshop-trust {
		grid-template-columns: repeat(2, 1fr);
		row-gap: 1.25rem;
	}
	.bookshop-trust li {
		justify-content: flex-start;
		gap: 0.6rem;
		padding-inline: 0.5rem;
	}
	.bookshop-trust li:nth-child(3) {
		border-left: 0;
	}
	.bookshop-trust svg {
		width: 42px;
		height: 42px;
		padding: 11px;
	}
	.bookshop-trust strong {
		font-size: var(--wp--preset--font-size--small);
	}
}

/* ---------- Category cards ---------- */
.bookshop-cat-cards {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 1.25rem;
	margin: 0;
	padding: 0;
	list-style: none;
}
.bookshop-cat-cards a {
	display: flex;
	flex-direction: column;
	height: 100%;
	overflow: hidden;
	background: #fff;
	border: var(--bs-border);
	border-radius: 12px;
	color: var(--wp--preset--color--accent-4);
	text-decoration: none;
}
.bookshop-cat-cards img {
	display: block;
	width: 100%;
	aspect-ratio: 4 / 3;
	object-fit: cover;
}
.bookshop-cat-cards span {
	position: relative;
	padding: 1rem 4rem 1.1rem 1.1rem;
	font-size: var(--wp--preset--font-size--small);
	line-height: 1.5;
}
.bookshop-cat-cards strong {
	display: block;
	margin-bottom: 0.15rem;
	font-family: var(--wp--preset--font-family--noto-serif-bengali);
	font-size: var(--wp--preset--font-size--medium);
	font-weight: 600;
	color: var(--wp--preset--color--contrast);
}
/* Round arrow on the right of the text. */
.bookshop-cat-cards span::after {
	content: "›";
	position: absolute;
	top: 50%;
	right: 1.1rem;
	display: grid;
	place-items: center;
	width: 40px;
	height: 40px;
	margin-top: -20px;
	border-radius: 50%;
	background: var(--wp--preset--color--accent-5);
	border: var(--bs-border);
	color: var(--wp--preset--color--contrast);
	font-size: 1.5rem;
	line-height: 1;
}
.bookshop-cat-cards a:hover {
	border-color: #CBD3DE;
	box-shadow: var(--bs-shadow-hover);
}
.bookshop-cat-cards a:hover strong {
	color: var(--wp--preset--color--accent-1);
}
.bookshop-cat-cards a:hover span::after {
	background: var(--wp--preset--color--accent-1);
	border-color: var(--wp--preset--color--accent-1);
	color: #fff;
}
@media (max-width: 900px) {
	.bookshop-cat-cards {
		grid-template-columns: repeat(2, 1fr);
		gap: 0.75rem;
	}
	.bookshop-cat-cards span {
		padding: 0.75rem 3rem 0.85rem 0.85rem;
	}
	.bookshop-cat-cards span::after {
		right: 0.75rem;
		width: 32px;
		height: 32px;
		margin-top: -16px;
	}
}

/* ---------- Combo offer ---------- */
/* Light, price-led box: pitch on the left, the top three combos ([bookshop_combos]) on the right. */
.bookshop-offer {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr);
	align-items: center;
	gap: var(--wp--preset--spacing--50);
	padding: var(--wp--preset--spacing--40) var(--wp--preset--spacing--50);
	border: var(--bs-border);
	border-radius: 12px;
	background: var(--wp--preset--color--accent-5);
}
.bookshop-offer h2 {
	margin: 0.6rem 0 0.4rem;
	font-family: var(--wp--preset--font-family--noto-serif-bengali);
	font-size: var(--wp--preset--font-size--x-large);
	font-weight: 700;
	line-height: 1.35;
}
.bookshop-offer__text > p {
	margin: 0;
	color: var(--wp--preset--color--accent-4);
}
.bookshop-offer .bookshop-offer__label {
	display: inline-block;
	padding: 0.1rem 0.7rem;
	border-radius: 4px;
	background: var(--wp--preset--color--accent-3);
	color: #fff;
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
}
.bookshop-offer__perks {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem 1.25rem;
	margin: 1rem 0 1.25rem;
	padding: 0;
	list-style: none;
	font-size: var(--wp--preset--font-size--small);
	font-weight: 500;
}
.bookshop-offer__perks li::before {
	content: "✓ ";
	color: var(--wp--preset--color--accent-1);
	font-weight: 700;
}
.bookshop-offer__button {
	display: inline-block;
	padding: 0.6rem 1.4rem;
	border-radius: 6px;
	background: var(--wp--preset--color--accent-1);
	color: #fff;
	font-weight: 600;
	text-decoration: none;
}
.bookshop-offer__button::after {
	content: " →";
}
.bookshop-offer__button:hover {
	background: #0B5234;
}
.bookshop-combos {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 0.6rem;
	margin: 0;
	padding: 0;
	list-style: none;
}
.bookshop-combos a {
	display: flex;
	align-items: center;
	gap: 0.85rem;
	padding: 0.6rem 0.85rem 0.6rem 0.6rem;
	border: var(--bs-border);
	border-radius: 10px;
	background: #fff;
	color: var(--wp--preset--color--contrast);
	text-decoration: none;
}
.bookshop-combos a:hover {
	border-color: #CBD3DE;
	box-shadow: var(--bs-shadow-hover);
}
.bookshop-combos img {
	flex: none;
	width: 64px;
	height: 64px;
	object-fit: cover;
	border-radius: 6px;
}
.bookshop-combos a > span {
	flex: 1;
	min-width: 0;
}
.bookshop-combos strong {
	display: block;
	overflow: hidden;
	font-weight: 600;
	white-space: nowrap;
	text-overflow: ellipsis;
}
.bookshop-combos .price {
	display: flex;
	gap: 0.5rem;
	align-items: baseline;
	font-size: var(--wp--preset--font-size--medium);
	font-weight: 700;
	color: var(--wp--preset--color--accent-1);
}
.bookshop-combos .price ins {
	order: -1;
	text-decoration: none;
}
.bookshop-combos .price del {
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 400;
	color: var(--wp--preset--color--accent-4);
}
.bookshop-combos em {
	flex: none;
	padding: 0.2rem 0.5rem;
	border-radius: 4px;
	background: #FDECEC;
	color: var(--wp--preset--color--accent-3);
	font-size: var(--wp--preset--font-size--x-small);
	font-style: normal;
	font-weight: 700;
}
@media (max-width: 781px) {
	.bookshop-offer {
		grid-template-columns: minmax(0, 1fr);
		gap: var(--wp--preset--spacing--30);
		padding: var(--wp--preset--spacing--30);
	}
}

/* ---------- FAQ (core Details blocks) ---------- */
.bookshop-faq h2 {
	margin-bottom: 0.25rem;
	font-family: var(--wp--preset--font-family--noto-serif-bengali);
	font-weight: 700;
}
.bookshop-faq h2::after {
	content: "";
	display: block;
	width: 32px;
	height: 3px;
	margin: 0.4rem auto 0;
	background: var(--wp--preset--color--accent-1);
}
.bookshop-faq > p {
	margin-bottom: var(--wp--preset--spacing--30);
}
.bookshop-faq-item {
	margin-block: 0 0.75rem !important;
	border: var(--bs-border);
	border-radius: 10px;
	background: #fff;
}
.bookshop-faq-item summary {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 1rem;
	padding: 0.9rem 1.1rem;
	font-weight: 600;
	cursor: pointer;
	list-style: none;
}
.bookshop-faq-item summary::-webkit-details-marker {
	display: none;
}
.bookshop-faq-item summary::after {
	content: "+";
	flex: none;
	font-size: 1.4rem;
	font-weight: 400;
	line-height: 1;
	color: var(--wp--preset--color--accent-1);
}
.bookshop-faq-item[open] summary::after {
	content: "−";
}
.bookshop-faq-item[open] {
	border-color: #CBD3DE;
}
.bookshop-faq-item > p {
	margin: 0;
	padding: 0 1.1rem 1rem;
	color: var(--wp--preset--color--accent-4);
}

/* ---------- Reader reviews ([bookshop_reviews]) ---------- */
.bookshop-reviews {
	padding-block: var(--wp--preset--spacing--50) var(--wp--preset--spacing--40);
}
.bookshop-reviews ul {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
	gap: 1.25rem;
	margin: 0;
	padding: 0;
	list-style: none;
}
.bookshop-reviews li {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
	padding: 1.25rem;
	border: var(--bs-border);
	border-radius: 12px;
	background: #fff;
}
.bookshop-reviews li p {
	flex: 1;
	margin: 0;
}
.bookshop-reviews footer {
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--accent-4);
}
.bookshop-reviews footer strong {
	display: block;
	color: var(--wp--preset--color--contrast);
}
.bookshop-reviews footer a {
	color: inherit;
}

/* ---------- Section heading ---------- */
.bookshop-section-head {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: var(--wp--preset--spacing--30);
}
.bookshop-section-head h2 {
	margin: 0;
	font-family: var(--wp--preset--font-family--noto-serif-bengali);
	font-weight: 700;
}
.bookshop-section-head h2::after {
	content: "";
	display: block;
	width: 32px;
	height: 3px;
	margin-top: 0.4rem;
	background: var(--wp--preset--color--accent-1);
}
.bookshop-viewall {
	margin: 0;
	white-space: nowrap;
}
.bookshop-viewall a {
	color: var(--wp--preset--color--accent-1);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
	text-decoration: none;
}
.bookshop-viewall a:hover {
	text-decoration: underline;
}

/* ---------- Product cards ---------- */
.wc-block-product-template > li,
.wc-block-product {
	display: flex;
	flex-direction: column;
	background: #fff;
	border: var(--bs-border);
	border-radius: var(--bs-radius);
	padding: 0.625rem;
}
/* The card block (blocks/product-card) fills the grid cell so the button sits at the bottom. */
.wp-block-bookshop-product-card {
	display: flex;
	flex: 1;
	flex-direction: column;
}
.wc-block-product:hover {
	border-color: #CBD3DE;
	box-shadow: var(--bs-shadow-hover);
}
.wc-block-product .wc-block-components-product-image {
	margin-bottom: 0 !important;
}
.wc-block-components-product-image img {
	aspect-ratio: 1;
	object-fit: cover !important;
	background: var(--wp--preset--color--accent-5);
	border-radius: 6px;
}
.wc-block-product .wp-block-post-title {
	margin: 0.7rem 0 0.35rem !important;
	font-family: var(--wp--preset--font-family--noto-serif-bengali);
	font-size: var(--wp--preset--font-size--medium) !important;
	font-weight: 600;
	line-height: 1.5;
	/* Two lines max so every card lines up. */
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	overflow: hidden;
}
.wc-block-product .wp-block-post-title a {
	color: var(--wp--preset--color--contrast);
	text-decoration: none;
}
.wc-block-product .wp-block-post-title a:hover {
	color: var(--wp--preset--color--accent-1);
}
.wc-block-components-product-price {
	color: var(--wp--preset--color--contrast);
	font-weight: 600;
}
.wc-block-product .wc-block-components-product-price {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0 0.5rem;
	text-align: left;
}
.wc-block-components-product-price ins {
	order: -1;
	text-decoration: none;
}
.wc-block-product .wc-block-components-product-price ins,
.wc-block-product .wc-block-components-product-price > .amount {
	font-size: var(--wp--preset--font-size--medium);
	color: var(--wp--preset--color--accent-1);
}
.wc-block-components-product-price del {
	color: var(--wp--preset--color--accent-4);
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 400;
}
.wc-block-components-product-sale-badge {
	background: #DC2626 !important;
	color: #fff !important;
	border: 0 !important;
	border-radius: 4px !important;
	padding: 0.2rem 0.45rem !important;
	font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	font-size: var(--wp--preset--font-size--x-small) !important;
	font-weight: 700;
	line-height: 1.4 !important;
	letter-spacing: 0.02em;
	text-transform: none !important;
	box-shadow: 0 2px 6px rgb(220 38 38 / 0.35);
}
.wc-block-product .wp-block-woocommerce-product-button {
	margin-top: auto;
	padding-top: 0.75rem;
	align-items: stretch !important;
}
.wc-block-product .wp-block-woocommerce-product-price {
	margin-bottom: 0 !important;
}
.wc-block-product .wc-block-components-product-button__button {
	width: 100%;
	background: var(--wp--preset--color--accent-1) !important;
	color: #fff !important;
	border: 0 !important;
	border-radius: 6px !important;
	padding: 0.55rem 0.75rem !important;
	font-weight: 500;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.4rem;
}
.wc-block-product .wc-block-components-product-button__button::before {
	content: "";
	flex: none;
	width: 16px;
	height: 16px;
	background: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='9' cy='20' r='1.5'/%3E%3Ccircle cx='18' cy='20' r='1.5'/%3E%3Cpath d='M2 3h3l2.7 12.4a1 1 0 0 0 1 .8h9.6a1 1 0 0 0 1-.8L21 7H6'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='9' cy='20' r='1.5'/%3E%3Ccircle cx='18' cy='20' r='1.5'/%3E%3Cpath d='M2 3h3l2.7 12.4a1 1 0 0 0 1 .8h9.6a1 1 0 0 0 1-.8L21 7H6'/%3E%3C/svg%3E") center / contain no-repeat;
}
.wc-block-product .wc-block-components-product-button__button.is-loading::before {
	visibility: hidden;
}
/* Stars from functions.php: grey row, gold row on top clipped to the rating. */
.bookshop-rating {
	margin: 0.3rem 0 0;
	font-size: var(--wp--preset--font-size--x-small);
	color: var(--wp--preset--color--accent-4);
}
.bookshop-stars {
	position: relative;
	display: inline-block;
	letter-spacing: 1px;
	color: #D5D9DF;
}
.bookshop-stars::before,
.bookshop-stars::after {
	content: "★★★★★";
}
.bookshop-stars::after {
	position: absolute;
	inset: 0 auto 0 0;
	width: var(--rating);
	overflow: hidden;
	color: #F5A623;
	white-space: nowrap;
}
/* Adding to cart: spinner, label hidden (assets/add-to-cart-loading.js). */
.wc-block-product .wc-block-components-product-button__button.is-loading {
	position: relative;
	color: transparent !important;
	cursor: progress;
}
.wc-block-product .wc-block-components-product-button__button.is-loading::after {
	content: "";
	position: absolute;
	inset: 0;
	width: 18px;
	height: 18px;
	margin: auto;
	border: 2px solid rgb(255 255 255 / 0.35);
	border-top-color: #fff;
	border-radius: 50%;
	animation: bookshop-spin 0.7s linear infinite !important;
}
@keyframes bookshop-spin {
	to {
		transform: rotate(360deg);
	}
}
/* The header mini-cart opens its drawer on add, so the "View cart" link under the button isn't needed. */
.wc-block-product .wc-block-components-product-button > :has(> .added_to_cart) {
	display: none !important; /* Hide the wrapper too, or the flex gap still leaves space. */
}
.wc-block-product .wc-block-components-product-button__button:hover {
	background: #0B5234 !important;
}

/* ---------- Book authors ---------- */
.wc-block-product .wp-block-post-title:has(+ .bookshop-writer) {
	margin-bottom: 0.1rem !important;
}
.bookshop-writer {
	margin: 0 0 0.35rem;
	font-size: var(--wp--preset--font-size--small);
	line-height: 1.5;
	color: var(--wp--preset--color--accent-4);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.bookshop-writer a {
	color: inherit;
	text-decoration: none;
}
.bookshop-writer a:hover {
	color: var(--wp--preset--color--accent-1);
	text-decoration: underline;
}
.bookshop-writer-head {
	box-sizing: border-box;
	display: flex;
	align-items: center;
	gap: 1.5rem;
	margin-block: 1rem 2rem;
	padding: 1.5rem;
	background: var(--wp--preset--color--accent-5);
	border: var(--bs-border);
	border-radius: 12px;
}
.bookshop-writer-head .bookshop-writer-img {
	flex: none;
	width: 120px;
	height: 120px;
	border-radius: 50%;
	object-fit: cover;
}
.bookshop-writer-img.is-empty {
	display: grid;
	place-items: center;
	background: var(--wp--preset--color--accent-2);
	color: var(--wp--preset--color--accent-1);
	font-family: var(--wp--preset--font-family--noto-serif-bengali);
	font-size: 2.75rem;
	font-weight: 600;
}
.bookshop-writer-head h1 {
	margin: 0;
}
.bookshop-writer-count {
	margin: 0.15rem 0 0;
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--accent-4);
}
.bookshop-writer-bio {
	max-width: 65ch;
	margin-top: 0.75rem;
}
.bookshop-writer-bio p {
	margin: 0 0 0.5rem;
}
@media (max-width: 600px) {
	.bookshop-writer-head {
		flex-direction: column;
		text-align: center;
	}
}

/* ---------- Author strip ([bookshop_writers]) ---------- */
.bookshop-writers {
	position: relative;
}
.bookshop-writers ul {
	display: flex;
	gap: 1rem;
	margin: 0;
	padding: 0 0.25rem;
	list-style: none;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
}
.bookshop-writers li {
	flex: 0 0 150px;
	scroll-snap-align: start;
}
.bookshop-writers a {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.75rem;
	color: var(--wp--preset--color--contrast);
	font-weight: 500;
	text-align: center;
	text-decoration: none;
}
.bookshop-writers .bookshop-writer-img {
	width: 110px;
	height: 110px;
	border-radius: 50%;
	object-fit: cover;
}
.bookshop-writers a:hover {
	color: var(--wp--preset--color--accent-1);
}
.bookshop-writers button {
	position: absolute;
	top: 37px;
	z-index: 1;
	width: 36px;
	height: 36px;
	padding: 0;
	border: var(--bs-border);
	border-radius: 50%;
	background: #fff;
	box-shadow: var(--bs-shadow-hover);
	cursor: pointer;
}
.bookshop-writers button::before {
	content: "‹";
	font-size: 1.5rem;
	line-height: 1;
}
.bookshop-writers__prev {
	left: -18px;
}
.bookshop-writers__next {
	right: -18px;
}
.bookshop-writers__next::before {
	content: "›" !important;
}
/* Arrows only when the row overflows the screen width (roughly 6+ authors). */
.bookshop-writers:not(:has(li:nth-child(7))) button {
	display: none;
}

/* ---------- Product page (templates/single-product.html) ---------- */
.bookshop-product .woocommerce-breadcrumb {
	margin-bottom: var(--wp--preset--spacing--30);
	color: var(--wp--preset--color--accent-4);
}
.bookshop-product .woocommerce-breadcrumb a {
	color: inherit;
	text-decoration: none;
}
.bookshop-product .woocommerce-breadcrumb a:hover {
	color: var(--wp--preset--color--accent-1);
}

/* Gallery: image on a soft panel, discount badge top-left, small thumbnails below. */
.bookshop-product-media .wp-block-woocommerce-product-image-gallery {
	position: relative;
}
.bookshop-product-media .woocommerce-product-gallery__wrapper {
	margin: 0;
	overflow: hidden;
	border: var(--bs-border);
	border-radius: 12px;
	background: var(--wp--preset--color--accent-5);
}
.bookshop-product-media .woocommerce-product-gallery__image img {
	display: block;
	width: 100%;
	height: auto;
}
/* Beats WooCommerce's round olive .woocommerce span.onsale. */
.bookshop-product .bookshop-product-media span.onsale {
	position: absolute;
	top: 0.9rem;
	left: 0.9rem;
	z-index: 2;
	min-width: 0;
	min-height: 0;
	margin: 0;
	padding: 0.25rem 0.6rem;
	border-radius: 4px;
	background: #DC2626;
	color: #fff;
	font-size: var(--wp--preset--font-size--small);
	font-weight: 700;
	line-height: 1.4;
}
.bookshop-product-media .flex-control-thumbs {
	display: grid;
	grid-template-columns: repeat(5, 1fr);
	gap: 0.5rem;
	margin: 0.75rem 0 0;
	padding: 0;
	list-style: none;
}
.bookshop-product-media .flex-control-thumbs img {
	width: 100%;
	border: var(--bs-border);
	border-radius: 8px;
	opacity: 0.6;
	cursor: pointer;
}
.bookshop-product-media .flex-control-thumbs img.flex-active,
.bookshop-product-media .flex-control-thumbs img:hover {
	border-color: var(--wp--preset--color--accent-1);
	opacity: 1;
}

/* Summary column. */
.bookshop-product-summary > * {
	margin-block: 0 !important;
}
.bookshop-product-summary > * + * {
	margin-top: 1rem !important;
}
.bookshop-product-summary .wp-block-post-title {
	font-weight: 700;
	line-height: 1.35;
}
.bookshop-product-summary .bookshop-writer {
	margin-top: 0.35rem !important;
	font-size: var(--wp--preset--font-size--medium);
}
.bookshop-product-summary .bookshop-rating {
	margin-top: 0.5rem !important;
	font-size: var(--wp--preset--font-size--small);
}
.bookshop-product-summary .bookshop-rating a {
	color: inherit;
}
.bookshop-product-summary .wc-block-components-product-price {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0 0.75rem;
	font-weight: 700;
}
.bookshop-product-summary .wc-block-components-product-price ins {
	order: -1;
	color: var(--wp--preset--color--accent-1);
	text-decoration: none;
}
.bookshop-product-summary .wc-block-components-product-price del {
	font-size: var(--wp--preset--font-size--medium);
	font-weight: 400;
	color: var(--wp--preset--color--accent-4);
}
.bookshop-save {
	display: inline-block;
	margin: 0.4rem 0 0;
	padding: 0.15rem 0.6rem;
	border-radius: 4px;
	background: #FDECEC;
	color: var(--wp--preset--color--accent-3);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
}
.bookshop-product-excerpt {
	padding: 0.85rem 1rem;
	border: var(--bs-border);
	border-radius: 10px;
	background: var(--wp--preset--color--accent-5);
}
.bookshop-product-excerpt p {
	margin: 0;
}
.bookshop-product-excerpt p + p {
	margin-top: 0.5rem;
}

/* Quantity + add to cart + buy now. */
.bookshop-product-summary form.cart {
	display: flex;
	flex-wrap: wrap;
	gap: 0.6rem;
	margin: 0;
}
/* WooCommerce's clearfix pseudo-elements become empty flex items (and take a gap) here. */
.bookshop-product-summary form.cart::before,
.bookshop-product-summary form.cart::after {
	display: none !important;
}
.bookshop-product-summary form.cart .quantity,
.bookshop-product-summary form.cart .quantity input.qty {
	margin: 0 !important;
	float: none !important;
}
.bookshop-product-summary form.cart .quantity input.qty {
	box-sizing: border-box;
	width: 4.5rem;
	height: 48px;
	border: var(--bs-border);
	border-radius: 8px;
	font-size: var(--wp--preset--font-size--medium);
	text-align: center;
}
.bookshop-product-summary form.cart .button {
	flex: 1 1 160px;
	height: 48px;
	margin: 0 !important;
	padding: 0 1.25rem !important;
	border-radius: 8px !important;
	font-size: var(--wp--preset--font-size--medium) !important;
	font-weight: 600;
}
.bookshop-product-summary .single_add_to_cart_button {
	border: 2px solid var(--wp--preset--color--accent-1) !important;
	background: #fff !important;
	color: var(--wp--preset--color--accent-1) !important;
}
.bookshop-product-summary .single_add_to_cart_button:hover {
	background: var(--wp--preset--color--accent-2) !important;
}
.bookshop-buy-now {
	border: 2px solid var(--wp--preset--color--accent-1) !important;
	background: var(--wp--preset--color--accent-1) !important;
	color: #fff !important;
}
.bookshop-buy-now:hover {
	background: #0B5234 !important;
}
.bookshop-product-summary .yith-add-to-wishlist-button-block {
	margin-top: 0.75rem !important;
	font-size: var(--wp--preset--font-size--small);
}

/* Delivery / payment / return box. */
.bookshop-product-info {
	margin: 1.25rem 0 0;
	padding: 0;
	border: var(--bs-border);
	border-radius: 10px;
	list-style: none;
}
.bookshop-product-info li {
	display: grid;
	grid-template-columns: 22px 1fr;
	column-gap: 0.75rem;
	align-items: center;
	padding: 0.7rem 1rem;
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--accent-4);
}
.bookshop-product-info li + li {
	border-top: var(--bs-border);
}
.bookshop-product-info li::before {
	content: "";
	grid-row: span 2;
	width: 22px;
	height: 22px;
	background: var(--wp--preset--color--accent-1);
	-webkit-mask: var(--icon) center / contain no-repeat;
	mask: var(--icon) center / contain no-repeat;
}
.bookshop-product-info strong {
	color: var(--wp--preset--color--contrast);
	font-weight: 600;
}
.bookshop-product-info .is-truck {
	--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linejoin='round'%3E%3Cpath d='M1 5h13v11H1zM14 9h4l4 4v3h-8z'/%3E%3Ccircle cx='5.5' cy='17.5' r='2'/%3E%3Ccircle cx='17.5' cy='17.5' r='2'/%3E%3C/svg%3E");
}
.bookshop-product-info .is-cash {
	--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8'%3E%3Crect x='2' y='6' width='20' height='12' rx='2'/%3E%3Ccircle cx='12' cy='12' r='2.5'/%3E%3C/svg%3E");
}
.bookshop-product-info .is-return {
	--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round'%3E%3Cpath d='M3 12a9 9 0 1 0 3-6.7L3 8'/%3E%3Cpath d='M3 3v5h5'/%3E%3C/svg%3E");
}
.bookshop-product-summary .wp-block-woocommerce-product-meta {
	color: var(--wp--preset--color--accent-4);
}
.bookshop-product-summary .wp-block-post-terms a {
	color: var(--wp--preset--color--contrast);
}

/* Details tabs: underline tabs over a bordered panel. */
.bookshop-product-details {
	margin-top: var(--wp--preset--spacing--60) !important;
}
.bookshop-product-details .woocommerce-tabs ul.tabs {
	display: flex;
	gap: 1.5rem;
	margin: 0;
	padding: 0;
	border-bottom: var(--bs-border);
	list-style: none;
	overflow-x: auto;
	scrollbar-width: none;
}
.bookshop-product-details .woocommerce-tabs ul.tabs li {
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
}
.bookshop-product-details .woocommerce-tabs ul.tabs li a {
	display: block;
	padding: 0.75rem 0;
	color: var(--wp--preset--color--accent-4);
	font-weight: 600;
	white-space: nowrap;
	text-decoration: none;
	box-shadow: inset 0 -2px 0 transparent;
}
.bookshop-product-details .woocommerce-tabs ul.tabs li.active a,
.bookshop-product-details .woocommerce-tabs ul.tabs li a:hover {
	color: var(--wp--preset--color--accent-1);
	box-shadow: inset 0 -2px 0 var(--wp--preset--color--accent-1);
}
.bookshop-product-details .woocommerce-Tabs-panel {
	max-width: 760px;
	padding: var(--wp--preset--spacing--30) 0 0;
}
/* The tab already names the panel. */
.bookshop-product-details .woocommerce-Tabs-panel--description > h2:first-child,
.bookshop-product-details .woocommerce-Tabs-panel--additional_information > h2:first-child {
	display: none;
}
.bookshop-product-details .shop_attributes {
	width: 100%;
	border-collapse: collapse;
	border: var(--bs-border);
}
.bookshop-product-details .shop_attributes :is(th, td) {
	padding: 0.6rem 1rem;
	border-bottom: var(--bs-border);
	text-align: left;
}
.bookshop-product-details .shop_attributes th {
	width: 35%;
	background: var(--wp--preset--color--accent-5);
	font-weight: 600;
}
.bookshop-product-details .shop_attributes p {
	margin: 0;
}

/* "Recently ordered" strip (Code Snippets: [recently_ordered_books]). */
/* The snippet prints outside the wide blocks, so match their width. */
.bookshop-product .recently-ordered-global {
	max-width: var(--wp--style--global--wide-size) !important;
}
.rob-section {
	margin-top: var(--wp--preset--spacing--50);
}
.rob-heading h2 {
	margin: 0;
	font-family: var(--wp--preset--font-family--noto-serif-bengali);
	font-weight: 700;
}
.rob-heading p {
	margin: 0.25rem 0 var(--wp--preset--spacing--30);
	color: var(--wp--preset--color--accent-4);
}
.rob-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
	gap: 0.75rem;
}
.rob-card {
	display: flex;
	flex-direction: column;
	overflow: hidden;
	border: var(--bs-border);
	border-radius: 10px;
	background: #fff;
}
.rob-cover img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 1;
	object-fit: cover;
}
.rob-info {
	padding: 0.6rem 0.7rem 0.7rem;
	font-size: var(--wp--preset--font-size--x-small);
	color: var(--wp--preset--color--accent-4);
}
.rob-info h3 {
	margin: 0 0 0.3rem;
	font-size: var(--wp--preset--font-size--small);
	line-height: 1.4;
}
.rob-info h3 a {
	color: var(--wp--preset--color--contrast);
	text-decoration: none;
}
.rob-info p {
	margin: 0;
}

.bookshop-related {
	margin-top: var(--wp--preset--spacing--60) !important;
}

@media (max-width: 781px) {
	.bookshop-product-top {
		gap: var(--wp--preset--spacing--30) !important;
	}
	/* Quantity + add to cart on one row, buy now full width below. */
	.bookshop-buy-now {
		flex-basis: 100% !important;
	}
	.rob-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

/* ---------- Checkout & cart: bordered panels ---------- */
.wp-block-woocommerce-checkout,
.wp-block-woocommerce-cart {
	border: var(--bs-border);
	border-radius: 12px;
	padding: 1.5rem !important;
}
.wc-block-checkout .wc-block-components-checkout-step,
.wc-block-checkout__sidebar,
.wc-block-cart__sidebar {
	background: var(--wp--preset--color--accent-5);
	border: var(--bs-border);
	border-radius: var(--bs-radius);
	padding: 1.25rem !important;
	margin-bottom: 1rem !important;
}
.wc-block-checkout .wc-block-components-checkout-step::after {
	display: none;
}
.wc-block-checkout .wc-block-components-checkout-step__container,
.wc-block-checkout .wc-block-components-checkout-step__heading {
	padding-left: 0 !important;
	margin-left: 0 !important;
}
.wc-block-checkout .wc-block-components-checkout-step__title::before {
	display: none !important;
}
.wc-block-components-text-input input,
.wc-block-components-combobox .wc-block-components-combobox-control input,
.wc-block-components-textarea,
.wc-blocks-components-select__select {
	background: #fff !important;
	border: var(--bs-border) !important;
	border-radius: 6px !important;
}
.wc-block-components-checkout-place-order-button,
.wc-block-cart__submit-button {
	width: 100%;
	border-radius: 6px !important;
}
.wc-block-checkout__sidebar .wp-block-woocommerce-checkout-order-summary-block {
	border: 0 !important;
}

/* ---------- Mini-cart drawer ---------- */
.wc-block-components-drawer__screen-overlay {
	background-color: rgb(17 24 39 / 0.45);
}
.wc-block-components-drawer__screen-overlay--with-slide-in {
	animation-duration: 0.35s;
}
.wc-block-mini-cart__drawer {
	--drawer-width: 420px;
	--neg-drawer-width: -420px;
	box-shadow: -12px 0 40px rgb(17 24 39 / 0.18);
}
.wc-block-components-drawer__screen-overlay--with-slide-in .wc-block-mini-cart__drawer {
	animation-duration: 0.4s;
	animation-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
}
.wc-block-components-drawer__screen-overlay--with-slide-out .wc-block-mini-cart__drawer {
	transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Header: title + count, square close button. */
/* Notices area keeps a 16px margin even when empty (it holds only whitespace, so :empty won't match). */
.wp-block-woocommerce-mini-cart-contents .wc-block-components-notices:not(:has(*)) {
	display: none;
}
.wp-block-woocommerce-mini-cart-contents .wc-block-mini-cart__title {
	display: flex;
	align-items: center;
	gap: 0.4rem;
	margin: 0;
	padding: 1.25rem 4.5rem 1.25rem 1.5rem;
	border-bottom: var(--bs-border);
	font-size: var(--wp--preset--font-size--large);
	mask-image: none;
}
.wp-block-woocommerce-mini-cart-contents .wp-block-woocommerce-mini-cart-title-items-counter-block {
	color: var(--wp--preset--color--accent-4);
	font-weight: 500;
}
/* WooCommerce offsets this with margin:-1em and padding:1em; reset both so the position is exact. */
.wp-block-woocommerce-mini-cart-contents .wc-block-components-drawer__close-wrapper .wc-block-components-drawer__close {
	top: 14px; /* Centre of the title row. */
	inset-inline-end: 1.5rem;
	width: 40px;
	height: 40px;
	margin: 0;
	padding: 0 !important;
	display: grid;
	place-items: center;
	border-radius: 8px;
	background: var(--wp--preset--color--accent-5) !important;
	color: var(--wp--preset--color--contrast);
	opacity: 1;
}
.wp-block-woocommerce-mini-cart-contents .wc-block-components-drawer__close:hover {
	background: var(--wp--preset--color--accent-6) !important;
}

/* Items: image | name + trash / prices / quantity + saving. */
.wp-block-woocommerce-mini-cart-contents .wc-block-mini-cart__items {
	padding: 0 1.5rem;
}
.wp-block-woocommerce-mini-cart-contents .wc-block-cart-items {
	border: 0;
	margin: 0;
}
.wp-block-woocommerce-mini-cart-contents .wc-block-cart-items__row {
	display: grid !important;
	grid-template-columns: 84px minmax(0, 1fr) auto;
	grid-template-areas:
		"img name remove"
		"img prices prices"
		"img qty save";
	column-gap: 1rem;
	row-gap: 0.4rem;
	align-items: center;
	padding: 1.25rem 0 !important;
	border-bottom: var(--bs-border);
}
.wp-block-woocommerce-mini-cart-contents .wc-block-cart-items__row:last-child {
	border-bottom: 0;
}
.wp-block-woocommerce-mini-cart-contents .wc-block-cart-items__row > td {
	padding: 0 !important;
	border: 0 !important;
}
.wp-block-woocommerce-mini-cart-contents :is(td.wc-block-cart-item__product, .wc-block-cart-item__wrap, .wc-block-cart-item__quantity, td.wc-block-cart-item__total, .wc-block-cart-item__total-price-and-sale-badge-wrapper) {
	display: contents !important;
}
.wp-block-woocommerce-mini-cart-contents td.wc-block-cart-item__image {
	grid-area: img;
	align-self: start;
	width: auto;
}
.wp-block-woocommerce-mini-cart-contents .wc-block-cart-item__image img {
	width: 84px;
	height: 84px;
	object-fit: cover;
	border: var(--bs-border);
	border-radius: 8px;
}
.wp-block-woocommerce-mini-cart-contents .wc-block-components-product-name {
	grid-row: 1;
	grid-column: 2 / -1; /* Use the full width; the trash icon sits over the right edge. */
	padding-right: 2rem;
	color: var(--wp--preset--color--contrast);
	font-size: var(--wp--preset--font-size--medium);
	font-weight: 600;
	line-height: 1.45;
	text-decoration: none;
}
.wp-block-woocommerce-mini-cart-contents a.wc-block-components-product-name:hover {
	color: var(--wp--preset--color--accent-1);
}
.wp-block-woocommerce-mini-cart-contents .wc-block-cart-item__remove-link {
	grid-area: remove;
	justify-self: end;
	align-self: start;
	margin: 0 !important;
	color: var(--wp--preset--color--accent-4) !important;
}
.wp-block-woocommerce-mini-cart-contents .wc-block-cart-item__remove-link:hover {
	color: var(--wp--preset--color--accent-3) !important;
}
.wp-block-woocommerce-mini-cart-contents .wc-block-cart-item__prices {
	grid-area: prices;
	margin: 0;
	font-size: var(--wp--preset--font-size--small);
}
.wp-block-woocommerce-mini-cart-contents .wc-block-cart-item__prices .wc-block-components-product-price__value {
	font-weight: 600;
	color: var(--wp--preset--color--contrast);
}
.wp-block-woocommerce-mini-cart-contents .wc-block-cart-item__prices del {
	margin-right: 0.35rem;
	color: var(--wp--preset--color--accent-4);
	font-size: var(--wp--preset--font-size--x-small);
}
.wp-block-woocommerce-mini-cart-contents .wc-block-components-product-metadata,
.wp-block-woocommerce-mini-cart-contents .wc-block-cart-item__total .wc-block-components-product-price {
	display: none !important;
}
.wp-block-woocommerce-mini-cart-contents .wc-block-components-product-badge:not(.wc-block-components-sale-badge) {
	grid-column: 2 / -1;
	justify-self: start;
}
/* Quantity: [−] | n | [+] */
.wp-block-woocommerce-mini-cart-contents .wc-block-components-quantity-selector {
	grid-area: qty;
	width: 116px;
	min-width: 0;
	height: 38px;
	margin: 0;
	overflow: hidden;
	border: 1px solid #D1D5DB;
	border-radius: 8px;
	background: #fff;
}
.wp-block-woocommerce-mini-cart-contents .wc-block-components-quantity-selector::after {
	display: none;
}
.wp-block-woocommerce-mini-cart-contents .wc-block-components-quantity-selector .wc-block-components-quantity-selector__button {
	flex: 0 0 36px;
	min-width: 36px;
	color: var(--wp--preset--color--contrast);
	font-size: 1.15rem;
	line-height: 1;
	opacity: 1;
}
.wp-block-woocommerce-mini-cart-contents .wc-block-components-quantity-selector .wc-block-components-quantity-selector__button--minus {
	border-inline-end: 1px solid var(--wp--preset--color--accent-6);
}
.wp-block-woocommerce-mini-cart-contents .wc-block-components-quantity-selector .wc-block-components-quantity-selector__button--plus {
	border-inline-start: 1px solid var(--wp--preset--color--accent-6);
}
.wp-block-woocommerce-mini-cart-contents .wc-block-components-quantity-selector .wc-block-components-quantity-selector__button:hover:not(:disabled) {
	background: var(--wp--preset--color--accent-5);
	color: var(--wp--preset--color--accent-1);
}
.wp-block-woocommerce-mini-cart-contents .wc-block-components-quantity-selector .wc-block-components-quantity-selector__button:disabled {
	opacity: 0.3;
}
.wp-block-woocommerce-mini-cart-contents .wc-block-components-quantity-selector input.wc-block-components-quantity-selector__input {
	min-width: 0;
	padding: 0;
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
}
.wp-block-woocommerce-mini-cart-contents .wc-block-components-sale-badge {
	grid-area: save;
	justify-self: end;
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
	color: #15803D;
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 600;
	text-transform: none;
}

/* Footer: subtotal, note, one big checkout button. */
.wp-block-woocommerce-mini-cart-contents .wc-block-mini-cart__footer {
	padding: 1.25rem 1.5rem 1.5rem;
	border-top: var(--bs-border);
	box-shadow: 0 -8px 24px rgb(17 24 39 / 0.05);
}
.wp-block-woocommerce-mini-cart-contents .wc-block-mini-cart__footer-subtotal {
	margin-bottom: 0 !important;
	padding: 0 0 1rem;
	font-size: var(--wp--preset--font-size--large);
	font-weight: 700;
}
.wp-block-woocommerce-mini-cart-contents .wc-block-mini-cart__footer-subtotal .wc-block-components-totals-item__description {
	display: none !important; /* "Shipping ... calculated at checkout" note. */
}
.wp-block-woocommerce-mini-cart-contents .wc-block-mini-cart__footer-actions {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}
.wp-block-woocommerce-mini-cart-contents :is(.wc-block-mini-cart__footer-checkout, .wc-block-mini-cart__footer-cart) {
	box-sizing: border-box;
}
.wp-block-woocommerce-mini-cart-contents .wc-block-mini-cart__footer-checkout {
	order: -1;
	width: 100%;
	margin: 0;
	padding: 0.8rem 1rem;
	border: 0;
	border-radius: 8px;
	background: var(--wp--preset--color--accent-1);
	color: #fff;
	font-size: var(--wp--preset--font-size--medium);
	font-weight: 600;
	line-height: 1.4;
}
.wp-block-woocommerce-mini-cart-contents .wc-block-mini-cart__footer-checkout:hover {
	background: #0B5234;
	color: #fff;
}
.wp-block-woocommerce-mini-cart-contents .wc-block-mini-cart__footer-cart {
	width: 100%;
	margin: 0;
	padding: 0.35rem;
	border: 0 !important;
	background: none !important;
	box-shadow: none !important;
	color: var(--wp--preset--color--accent-4) !important;
	font-size: var(--wp--preset--font-size--small);
	text-decoration: underline;
	text-underline-offset: 3px;
}

/* Payment logos under the checkout button (patterns/mini-cart-payment-icons.php). */
.bookshop-pay-icons {
	gap: 0.4rem !important;
	margin-top: 0.4rem;
}
.bookshop-pay-icons .wp-block-image {
	display: flex;
	align-items: center;
	box-sizing: border-box;
	height: 30px;
	margin: 0;
	padding: 4px 8px;
	border: var(--bs-border);
	border-radius: 6px;
	background: #fff;
}
.bookshop-pay-icons img {
	width: auto;
	height: 100%;
	max-width: 64px;
	object-fit: contain;
}

/* ---------- Classic checkout: Shopify-style two columns ---------- */
/* Left: details + payment (.bookshop-co-main). Right: summary (.bookshop-co-summary). Wrappers come from functions.php. */
.bookshop-co-secure {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	margin: 0;
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--accent-4);
}
.bookshop-co-secure::before {
	content: "";
	width: 15px;
	height: 15px;
	background: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='11' width='16' height='10' rx='2'/%3E%3Cpath d='M8 11V7a4 4 0 0 1 8 0v4'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='11' width='16' height='10' rx='2'/%3E%3Cpath d='M8 11V7a4 4 0 0 1 8 0v4'/%3E%3C/svg%3E") center / contain no-repeat;
}
.bookshop-co {
	--co-line: #D1D5DB;
}
.bookshop-co > *,
.bookshop-co .wp-block-post-content > p:empty {
	margin-block: 0;
}
.bookshop-co .woocommerce:has(> form.checkout) {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 400px;
	column-gap: 3rem;
	align-items: start;
	padding-block: 2.5rem;
}
.bookshop-co .woocommerce:has(> form.checkout) > *,
.bookshop-co form.checkout > * {
	grid-column: 1;
	margin-top: 0;
}
.bookshop-co form.checkout {
	display: contents;
}
.bookshop-co .woocommerce-notices-wrapper:empty {
	display: none;
}

/* Summary panel: grey to the right edge of the screen, full height. */
.bookshop-co-summary {
	grid-column: 2 !important;
	grid-row: 1 / span 20;
	align-self: stretch;
	margin-block: -2.5rem !important; /* Reach the header and footer lines. */
	padding: 2.5rem 0 2.5rem 2.5rem;
	background: var(--wp--preset--color--accent-5);
	border-left: 1px solid var(--wp--preset--color--accent-6);
	box-shadow: 0 0 0 100vmax var(--wp--preset--color--accent-5);
	clip-path: inset(0 -100vmax 0 0);
}
.bookshop-co-summary__inner {
	position: sticky;
	top: calc(var(--wp-admin--admin-bar--height, 0px) + 1.5rem);
}
.bookshop-co #order_review_heading,
.bookshop-co-heading,
.bookshop-co #customer_details h3 {
	margin: 0 0 1rem;
	font-size: var(--wp--preset--font-size--large);
}
.bookshop-co .woocommerce-checkout-review-order-table {
	width: 100% !important;
	margin: 0 !important;
	border: 0 !important;
	border-collapse: collapse;
	background: none;
	font-size: var(--wp--preset--font-size--small);
}
.bookshop-co .woocommerce-checkout-review-order-table thead {
	display: none;
}
.bookshop-co .woocommerce-checkout-review-order-table :is(th, td) {
	padding: 0.4rem 0 !important;
	border: 0 !important;
	background: none !important;
	font-weight: 400;
	text-align: left;
	vertical-align: middle;
}
.bookshop-co .woocommerce-checkout-review-order-table :is(td:last-child, tfoot td) {
	text-align: right;
	white-space: nowrap;
}
.bookshop-co .woocommerce-checkout-review-order-table .cart_item td {
	padding: 0.6rem 0 !important;
}
.bookshop-co-item {
	display: flex;
	align-items: center;
	gap: 0.9rem;
}
.bookshop-co .product-quantity {
	display: none;
}
.bookshop-co-thumb {
	position: relative;
	flex: none;
}
.bookshop-co-thumb img {
	display: block;
	width: 56px;
	height: 56px;
	object-fit: cover;
	border: 1px solid var(--wp--preset--color--accent-6);
	border-radius: 8px;
	background: #fff;
}
.bookshop-co-qty {
	position: absolute;
	top: -8px;
	right: -8px;
	box-sizing: border-box;
	min-width: 20px;
	height: 20px;
	padding: 0 5px;
	display: grid;
	place-items: center;
	border-radius: 999px;
	background: rgb(17 24 39 / 0.75);
	color: #fff;
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 600;
}
.bookshop-co-name {
	font-weight: 500;
	line-height: 1.45;
}
.bookshop-co .woocommerce-checkout-review-order-table tfoot tr:first-child :is(th, td) {
	padding-top: 1.1rem !important;
	border-top: 1px solid var(--co-line) !important;
}
.bookshop-co .woocommerce-checkout-review-order-table .order-total :is(th, td) {
	padding-top: 0.9rem !important;
	font-size: var(--wp--preset--font-size--large);
	font-weight: 700;
}
.bookshop-co #shipping_method {
	margin: 0;
	padding: 0;
	list-style: none;
}

/* Coupon: a quiet line instead of a banner. */
.bookshop-co .woocommerce-form-coupon-toggle .wc-block-components-notice-banner {
	margin: 0 0 1.25rem;
	padding: 0 !important;
	border: 0;
	background: none;
	font-size: var(--wp--preset--font-size--small);
}
.bookshop-co .woocommerce-form-coupon-toggle .wc-block-components-notice-banner > svg {
	display: none;
}
.bookshop-co .woocommerce-form-coupon-toggle .wc-block-components-notice-banner__content {
	padding: 0;
}
.bookshop-co .checkout_coupon {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	margin: 0 0 1.5rem !important;
	padding: 1rem !important;
	border: 1px solid var(--co-line) !important;
	border-radius: 8px !important;
}
.bookshop-co .checkout_coupon > p:first-child {
	flex-basis: 100%;
	margin: 0;
}
.bookshop-co .checkout_coupon .form-row-first {
	flex: 1;
}
.bookshop-co .checkout_coupon .clear {
	display: none;
}

/* Fields */
.bookshop-co #customer_details :is(.col-1, .col-2) {
	float: none;
	width: auto;
}
.bookshop-co #customer_details .col-2 {
	margin-top: 0.5rem;
}
.bookshop-co .woocommerce-billing-fields__field-wrapper {
	display: grid;
	grid-template-columns: 1fr 1fr;
	column-gap: 1rem;
}
.bookshop-co .woocommerce-billing-fields__field-wrapper > .form-row {
	grid-column: 1 / -1;
}
.bookshop-co .woocommerce-billing-fields__field-wrapper > :is(#billing_first_name_field, #billing_phone_field) {
	grid-column: auto;
}
.bookshop-co .woocommerce .form-row {
	float: none;
	width: auto;
	margin: 0 0 1rem !important;
	padding: 0 !important;
}
.bookshop-co .woocommerce .form-row label {
	display: block;
	margin-bottom: 0.35rem;
	font-size: var(--wp--preset--font-size--small);
	font-weight: 500;
	line-height: 1.5;
}
.bookshop-co .woocommerce :is(.form-row input.input-text, .form-row textarea, .form-row select, .payment_box input[type="text"], .payment_box input[type="tel"]),
.bookshop-co .woocommerce .select2-container .select2-selection--single {
	width: 100%;
	height: auto;
	box-sizing: border-box;
	padding: 0.75rem 0.9rem;
	border: 1px solid var(--co-line);
	border-radius: 6px;
	background: #fff;
	font: inherit;
	font-size: var(--wp--preset--font-size--medium);
	line-height: 1.4;
}
.bookshop-co .woocommerce .select2-selection__rendered {
	padding: 0 !important;
	line-height: 1.4 !important;
}
.bookshop-co .woocommerce .select2-selection__arrow {
	height: 100% !important;
	right: 0.5rem !important;
}
.bookshop-co .woocommerce .form-row textarea {
	min-height: 90px;
}
.bookshop-co .woocommerce :is(.form-row input.input-text, .form-row textarea, .form-row select, .payment_box input):focus,
.bookshop-co .woocommerce .select2-container--focus .select2-selection--single {
	border-color: var(--wp--preset--color--accent-1);
	box-shadow: 0 0 0 3px var(--wp--preset--color--accent-2);
	outline: none;
}
.bookshop-co .woocommerce .woocommerce-invalid :is(input.input-text, select) {
	border-color: var(--wp--preset--color--accent-3);
}

/* Payment: bordered radio cards. */
.bookshop-co-heading {
	margin-top: 1rem !important;
}
.bookshop-co #payment {
	background: none !important;
	border-radius: 0 !important;
}
.bookshop-co #payment ul.payment_methods {
	margin: 0 0 1.25rem !important;
	padding: 0 !important;
	border: 1px solid var(--co-line) !important;
	border-radius: 8px;
	overflow: hidden;
	list-style: none;
}
/* Label spans the whole row so anywhere on it selects the method; the radio sits on top. */
.bookshop-co #payment ul.payment_methods li {
	display: grid;
	grid-template-columns: auto 1fr;
	margin: 0 !important;
	padding: 0 !important;
	border-bottom: 1px solid var(--co-line);
	line-height: 1.5;
}
.bookshop-co #payment ul.payment_methods li:last-child {
	border-bottom: 0;
}
.bookshop-co #payment ul.payment_methods li:has(> input:checked) {
	background: var(--wp--preset--color--accent-2);
}
.bookshop-co #payment ul.payment_methods li > input[type="radio"] {
	position: relative;
	z-index: 1;
	grid-area: 1 / 1;
	align-self: center;
	margin: 0 0 0 1rem !important;
	accent-color: var(--wp--preset--color--accent-1);
}
.bookshop-co #payment ul.payment_methods li > label {
	grid-area: 1 / 1 / 2 / 3;
	display: flex !important;
	align-items: center;
	gap: 0.5rem;
	margin: 0;
	padding: 0.9rem 1rem 0.9rem 2.6rem;
	font-weight: 500;
	cursor: pointer;
}
.bookshop-co #payment ul.payment_methods li img {
	max-height: 24px;
	margin: 0 !important;
}
.bookshop-co #payment div.payment_box {
	grid-column: 1 / -1;
	margin: 0 !important;
	padding: 0 1rem 0.9rem !important;
	background: none !important;
	color: var(--wp--preset--color--accent-4);
	font-size: var(--wp--preset--font-size--small);
}
.bookshop-co #payment div.payment_box::before {
	display: none !important;
}
.bookshop-co #payment div.payment_box table {
	width: 100%;
	margin: 0.5rem 0 0;
	border: 0;
}
.bookshop-co #payment div.payment_box :is(th, td) {
	padding: 0.25rem 0;
	border: 0;
	background: none;
}
.bookshop-co #payment div.payment_box td:first-child {
	width: 40%;
	padding-right: 0.75rem;
}
.bookshop-co #payment div.payment_box p:last-child {
	margin-bottom: 0;
}
.bookshop-co #payment div.place-order {
	margin: 0 !important;
	padding: 0 !important;
}
.bookshop-co .woocommerce-privacy-policy-text {
	margin-top: 0.75rem;
	font-size: var(--wp--preset--font-size--x-small);
	line-height: 1.6;
	text-align: center;
	color: var(--wp--preset--color--accent-4);
}
.bookshop-co .woocommerce-privacy-policy-text p {
	margin: 0;
}
.bookshop-co .woocommerce-terms-and-conditions-wrapper .form-row label {
	font-size: var(--wp--preset--font-size--small);
	font-weight: 400;
}
.bookshop-co #payment #place_order {
	float: none !important;
	width: 100% !important;
	margin-top: 0.5rem;
	padding: 1rem !important;
	border-radius: 8px;
	background: var(--wp--preset--color--accent-1);
	color: #fff;
	font-size: var(--wp--preset--font-size--medium);
	font-weight: 600;
}
.bookshop-co #payment #place_order:hover {
	background: #0B5234;
}

@media (max-width: 900px) {
	.bookshop-co .woocommerce:has(> form.checkout) {
		grid-template-columns: minmax(0, 1fr);
		padding-top: 0;
	}
	.bookshop-co-summary {
		grid-column: 1 !important;
		grid-row: auto;
		order: -1;
		margin-block: 0 1.5rem !important;
		padding: 1.5rem 0;
		border-left: 0;
		border-bottom: 1px solid var(--wp--preset--color--accent-6);
		clip-path: inset(0 -100vmax);
	}
	.bookshop-co-summary__inner {
		position: static;
	}
	.bookshop-co .woocommerce-billing-fields__field-wrapper {
		grid-template-columns: 1fr;
	}
}

/* ---------- Footer ---------- */
/* Footer keeps the deeper grey; the shared panel colour (accent-5) is lighter. */
.bookshop-footer.has-accent-5-background-color {
	background-color: #F4F6F9 !important;
}
.bookshop-footer-links {
	padding-left: 0;
	list-style: none;
}
footer a {
	text-decoration: none;
}
footer a:hover {
	text-decoration: underline;
}
.bookshop-footer h3 {
	margin-bottom: 0.75rem;
}
@media (min-width: 782px) {
	.bookshop-footer .wp-block-column:nth-child(n+3) {
		border-left: var(--bs-border);
		padding-left: var(--wp--preset--spacing--40);
	}
}
.bookshop-footer-links li {
	margin-bottom: 0.4rem;
}
.bookshop-footer-links a {
	color: var(--wp--preset--color--accent-4);
}
.bookshop-contact li {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	color: var(--wp--preset--color--accent-4);
}
.bookshop-contact li::before {
	content: "";
	flex: none;
	width: 18px;
	height: 18px;
	background: var(--wp--preset--color--contrast);
	-webkit-mask: var(--icon) center / contain no-repeat;
	mask: var(--icon) center / contain no-repeat;
}
.bookshop-contact .is-pin {
	--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M12 22s7-6.2 7-12a7 7 0 0 0-14 0c0 5.8 7 12 7 12z'/%3E%3Ccircle cx='12' cy='10' r='2.5'/%3E%3C/svg%3E");
}
.bookshop-contact .is-phone {
	--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6.6 10.8a15 15 0 0 0 6.6 6.6l2.2-2.2a1 1 0 0 1 1-.25 11.4 11.4 0 0 0 3.6.57 1 1 0 0 1 1 1V20a1 1 0 0 1-1 1A17 17 0 0 1 3 4a1 1 0 0 1 1-1h3.5a1 1 0 0 1 1 1c0 1.25.2 2.45.57 3.57a1 1 0 0 1-.25 1z'/%3E%3C/svg%3E");
}
.bookshop-contact .is-mail {
	--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Crect x='3' y='5' width='18' height='14' rx='2'/%3E%3Cpath d='m3 7 9 6 9-6'/%3E%3C/svg%3E");
}

/* ---------- My account ---------- */
.woocommerce-account .woocommerce {
	display: grid;
	max-width: none !important;
	grid-template-columns: 240px 1fr;
	gap: 1.5rem;
	align-items: start;
}
.woocommerce-account .woocommerce::before,
.woocommerce-account .woocommerce::after {
	display: none !important;
}
.woocommerce-account .woocommerce > .woocommerce-notices-wrapper {
	grid-column: 1 / -1;
}
.woocommerce-MyAccount-navigation,
.woocommerce-MyAccount-content {
	float: none !important;
	width: auto !important;
	border: var(--bs-border);
	border-radius: var(--bs-radius);
}
.woocommerce-MyAccount-navigation {
	background: var(--wp--preset--color--accent-5);
	padding: 0.5rem;
}
.woocommerce-MyAccount-navigation ul {
	list-style: none;
	margin: 0;
	padding: 0;
}
.woocommerce-MyAccount-navigation li {
	margin: 0 0 2px !important;
	padding: 0 !important;
}
.woocommerce-MyAccount-navigation a {
	display: block;
	padding: 0.6rem 0.9rem;
	border-radius: 6px;
	color: var(--wp--preset--color--contrast);
	text-decoration: none !important;
	font-weight: 500;
}
.woocommerce-MyAccount-navigation a:hover {
	background: #fff;
}
.woocommerce-MyAccount-navigation .is-active a {
	background: var(--wp--preset--color--accent-2);
	color: var(--wp--preset--color--accent-1);
	box-shadow: inset 3px 0 0 var(--wp--preset--color--accent-1);
}
.woocommerce-MyAccount-navigation-link--customer-logout {
	border-top: var(--bs-border);
	margin-top: 0.5rem !important;
	padding-top: 0.5rem !important;
}
.woocommerce-MyAccount-navigation-link--customer-logout a {
	color: var(--wp--preset--color--accent-3);
}
.woocommerce-MyAccount-content {
	padding: 1.5rem 1.75rem;
	min-height: 320px;
}
.woocommerce-MyAccount-content > p:first-child {
	margin-top: 0;
}

/* Dashboard cards */
.bookshop-account-cards {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
	gap: 1rem;
	margin-top: 1.5rem;
}
.bookshop-account-cards a {
	display: block;
	border: var(--bs-border);
	border-radius: var(--bs-radius);
	padding: 1rem 1.1rem;
	text-decoration: none;
	color: var(--wp--preset--color--contrast);
	background: #fff;
}
.bookshop-account-cards a:hover {
	border-color: var(--wp--preset--color--accent-1);
}
.bookshop-account-cards strong {
	display: block;
	color: var(--wp--preset--color--accent-1);
}
.bookshop-account-cards span {
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--accent-4);
}

/* Tables, address cards, forms */
.woocommerce-MyAccount-content table.shop_table {
	width: 100%;
	border-collapse: collapse;
	border: var(--bs-border);
	border-radius: var(--bs-radius);
	overflow: hidden;
	font-size: var(--wp--preset--font-size--small);
}
.woocommerce-MyAccount-content table.shop_table th,
.woocommerce-MyAccount-content table.shop_table td {
	padding: 0.7rem 0.9rem;
	border-bottom: var(--bs-border);
	text-align: left;
}
.woocommerce-MyAccount-content table.shop_table thead th {
	background: var(--wp--preset--color--accent-5);
}
.woocommerce-Addresses {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 1rem;
}
.woocommerce-Addresses::before,
.woocommerce-Addresses::after {
	display: none !important;
}
.woocommerce-Address {
	float: none !important;
	width: auto !important;
	border: var(--bs-border);
	border-radius: var(--bs-radius);
	padding: 1rem 1.1rem;
}
.woocommerce-Address-title h2,
.woocommerce-MyAccount-content h2 {
	font-size: var(--wp--preset--font-size--medium);
	margin-top: 0;
}
.woocommerce-account .woocommerce form .form-row {
	margin-bottom: 1rem;
}
.woocommerce-account .woocommerce form .form-row label {
	display: block;
	font-weight: 500;
	margin-bottom: 0.3rem;
}
.woocommerce-account .woocommerce form .input-text,
.woocommerce-account .woocommerce form select {
	width: 100%;
	box-sizing: border-box;
	padding: 0.6rem 0.8rem;
	border: var(--bs-border);
	border-radius: 6px;
	background: #fff;
	font: inherit;
	font-size: var(--wp--preset--font-size--medium) !important;
}
.woocommerce-account .woocommerce form .input-text:focus {
	outline: 2px solid var(--wp--preset--color--accent-2);
	border-color: var(--wp--preset--color--accent-1);
}
.woocommerce-account fieldset {
	border: var(--bs-border);
	border-radius: var(--bs-radius);
	padding: 1rem 1.1rem;
	margin: 1.5rem 0;
}
.woocommerce-account .woocommerce .button {
	border-radius: 6px;
}

/* Logged out: centered login card */
.woocommerce-account:not(.logged-in) .woocommerce {
	display: block;
	max-width: 440px;
	margin-inline: auto;
	border: var(--bs-border);
	border-radius: 12px;
	padding: 1.75rem;
	background: var(--wp--preset--color--accent-5);
}
.woocommerce-account:not(.logged-in) .wp-block-post-title {
	text-align: center;
}
.woocommerce-account:not(.logged-in) .woocommerce-form-login__submit {
	width: 100%;
	margin-top: 0.75rem;
}

@media (max-width: 781px) {
	.woocommerce-account .woocommerce {
		grid-template-columns: 1fr;
	}
}

/* ---------- Phones ---------- */
@media (max-width: 781px) {
	/* The hero's empty right-hand column still takes space when stacked. */
	.bookshop-hero .wp-block-column:empty {
		display: none;
	}

	/* Trust bar: icon above the text, centred. */
	.bookshop-trust li {
		flex-direction: column;
		justify-content: flex-start;
		gap: 0.5rem;
		text-align: center;
	}

	/* Homepage book rows swipe sideways instead of a very long grid. */
	/* position: relative keeps WooCommerce's absolutely positioned screen-reader labels inside the scroller. */
	.home .wc-block-product-template {
		position: relative;
		display: flex !important;
		gap: 0.75rem;
		overflow-x: auto;
		scroll-snap-type: x mandatory;
		scrollbar-width: none;
		padding-bottom: 0.25rem;
	}
	.home .wc-block-product-template > li {
		flex: 0 0 41%; /* a sliver of the next card shows it swipes */
		scroll-snap-align: start;
	}

	/* Category cards: no arrow, so titles get the full width. */
	.bookshop-cat-cards span {
		padding: 0.7rem 0.8rem 0.8rem;
	}
	.bookshop-cat-cards span::after {
		display: none;
	}

	.bookshop-offer h2 {
		font-size: var(--wp--preset--font-size--large);
	}

	/* Footer: the two link lists side by side. */
	.bookshop-footer .wp-block-columns {
		flex-wrap: wrap !important;
		gap: var(--wp--preset--spacing--40) 1.5rem;
	}
	.bookshop-footer .wp-block-columns > .wp-block-column:is(:nth-child(2), :nth-child(3)) {
		flex-basis: calc(50% - 0.75rem) !important;
	}
}
