/* ==========================================================================
   Sachmat – shop styles (product grids, product page, cart, checkout, account)
   Loaded on shop pages and wherever a product collection or mini-cart renders.
   ========================================================================== */

/* ---------- Product grid ---------- */

.wc-block-product-template.sm-grid,
.wc-block-product-template__responsive.sm-grid {
	--sm-card-min: 9.25rem;
	display: grid !important;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, var(--sm-card-min)), 1fr)) !important;
	gap: var(--wp--preset--spacing--30) !important;
	margin: 0;
	padding: 0;
	list-style: none;
}

@media (min-width: 64rem) {
	.wc-block-product-template.sm-grid.columns-4 {
		grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
	}

	.wc-block-product-template.sm-grid.columns-3 {
		grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
	}

	html.sm-large-text .wc-block-product-template.sm-grid.columns-4 {
		grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
	}

	html.sm-large-text .wc-block-product-template.sm-grid.columns-3 {
		grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
	}
}

@media (min-width: 40rem) {
	.wc-block-product-template.sm-grid {
		--sm-card-min: 14rem;
		gap: var(--wp--preset--spacing--40) var(--wp--preset--spacing--30) !important;
	}
}

.wc-block-product-template.sm-grid > li {
	inline-size: auto !important;
	margin: 0 !important;
	display: flex;
}

/* ---------- Product card ---------- */

.sm-card {
	position: relative;
	display: flex;
	flex-direction: column;
	inline-size: 100%;
	border-radius: var(--sm-radius-l);
	background: var(--wp--preset--color--surface);
	box-shadow: 0 0 0 1px var(--wp--preset--color--line);
	transition: transform var(--sm-base) var(--sm-ease), box-shadow var(--sm-base) var(--sm-ease);
}

.sm-card > * {
	margin: 0 !important;
}

@media (hover: hover) {
	.sm-card:hover {
		transform: translateY(-4px);
		box-shadow: 0 0 0 1px var(--wp--preset--color--line-strong), var(--wp--preset--shadow--lift);
	}

	.sm-card:hover .sm-card__media img {
		transform: scale(1.04);
	}
}

.sm-card__media {
	position: relative;
	overflow: hidden;
	border-radius: var(--sm-radius-l) var(--sm-radius-l) 0 0;
	background: var(--sm-board-light);
}

.sm-card__media > * {
	margin: 0 !important;
}

.sm-card__media .wc-block-components-product-image {
	margin: 0 !important;
}

.sm-card__media .wc-block-components-product-image a {
	display: block;
	aspect-ratio: 1;
}

.sm-card__media img {
	box-sizing: border-box;
	display: block;
	inline-size: 100% !important;
	block-size: auto !important;
	aspect-ratio: 1;
	object-fit: contain !important;
	padding: 8%;
	mix-blend-mode: multiply;
	transition: transform var(--sm-slow) var(--sm-ease);
}

/* Quick view: always visible (no hover-only controls). */
.sm-qv-trigger {
	position: absolute;
	top: 0.6rem;
	right: 0.6rem;
	z-index: 2;
}

.sm-qv-trigger .sm-icon-btn {
	inline-size: 44px;
	block-size: 44px;
	border-color: transparent;
	background: color-mix(in srgb, var(--wp--preset--color--surface) 92%, transparent);
	box-shadow: var(--wp--preset--shadow--raised);
}

.sm-qv-trigger .sm-icon-btn:hover {
	border-color: var(--wp--preset--color--ink);
}

.sm-card__body {
	display: flex;
	flex-direction: column;
	flex: 1;
	gap: 0.5rem;
	padding: 0.85rem 0.85rem 1rem;
}

.sm-card__body > * {
	margin: 0 !important;
}

@media (min-width: 40rem) {
	.sm-card__body {
		padding: 1rem 1.1rem 1.2rem;
	}
}

.sm-card__title {
	font-family: var(--wp--preset--font-family--display);
	font-size: var(--wp--preset--font-size--small) !important;
	font-weight: 600;
	line-height: 1.3;
	letter-spacing: 0;
}

.sm-card__title a {
	color: var(--wp--preset--color--ink);
	text-decoration: none;
}

/* Whole card clickable through the title link; buttons stay above it. */
.sm-card__title a::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
	border-radius: var(--sm-radius-l);
}

.sm-card__title a:focus-visible {
	outline: none;
}

.sm-card__title a:focus-visible::after {
	outline: var(--wp--custom--focus--width) solid var(--sm-focus);
	outline-offset: 3px;
}

.sm-card__foot {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: 0.25rem 0.75rem;
	margin-top: auto !important;
}

.sm-card__foot > * {
	margin: 0 !important;
}

.sm-card .wc-block-components-product-price {
	font-family: var(--wp--preset--font-family--display);
	font-size: var(--wp--preset--font-size--large) !important;
	font-weight: 750;
	color: var(--wp--preset--color--ink);
}

.wc-block-components-product-price del,
.price del {
	color: var(--wp--preset--color--ink-soft);
	font-weight: 400;
	font-size: 0.8em;
	opacity: 1;
}

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

.sm-card .wc-block-components-product-stock-indicator {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	margin: 0;
	font-size: var(--wp--preset--font-size--small) !important;
	font-weight: 600;
	color: var(--wp--preset--color--green);
}

.sm-card .wc-block-components-product-stock-indicator::before {
	content: "";
	inline-size: 0.55rem;
	block-size: 0.55rem;
	border-radius: 50%;
	background: currentColor;
}

.sm-card .wc-block-components-product-stock-indicator--out-of-stock {
	color: var(--wp--preset--color--alert);
}

.sm-card .wc-block-components-product-stock-indicator--available-on-backorder {
	color: var(--wp--preset--color--star);
}

.sm-card .wc-block-components-product-rating {
	margin: 0;
}

.sm-card .wc-block-components-product-rating__container {
	justify-content: flex-start !important;
}

/* Add to cart button in cards */
.sm-card .wp-block-button.wc-block-components-product-button,
.sm-card .wc-block-components-product-button {
	position: relative;
	z-index: 2;
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 0.4rem;
	margin: 0.25rem 0 0 !important;
}

.sm-card .wc-block-components-product-button__button {
	box-sizing: border-box;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	text-decoration: none;
	inline-size: 100%;
	min-height: 48px;
	margin: 0 !important;
	border: 2px solid var(--wp--preset--color--green) !important;
	border-radius: var(--sm-radius-m) !important;
	background: var(--wp--preset--color--green) !important;
	color: var(--wp--preset--color--on-green) !important;
	font-family: var(--wp--preset--font-family--display) !important;
	font-size: var(--wp--preset--font-size--small) !important;
	font-weight: 650 !important;
	line-height: 1.2;
	white-space: normal;
}

.sm-card .wc-block-components-product-button__button:hover {
	background: var(--wp--preset--color--green-deep) !important;
	border-color: var(--wp--preset--color--green-deep) !important;
}

/* Out of stock / "read more" cards get the secondary style, so a dead end never looks like a buy button. */
.sm-card .wc-block-components-product-button__button:not(.add_to_cart_button) {
	background: transparent !important;
	color: var(--wp--preset--color--ink) !important;
	border-color: var(--wp--preset--color--ink) !important;
}

.sm-card .wc-block-components-product-button__button.loading {
	opacity: 1;
	cursor: progress;
}

.sm-card .wc-block-components-product-button__button.loading::after {
	content: "";
	inline-size: 1em;
	block-size: 1em;
	margin-inline-start: 0.5em;
	border: 2px solid currentColor;
	border-right-color: transparent;
	border-radius: 50%;
	animation: sm-spin 0.7s linear infinite;
	position: static;
	font-family: inherit;
}

/* "Added" feedback: a check mark pops in and the button briefly turns deep green. */
.sm-card .wc-block-components-product-button__button.added {
	background: var(--wp--preset--color--green-deep) !important;
}

.sm-card .wc-block-components-product-button__button.added::after {
	content: "";
	inline-size: 1.1em;
	block-size: 1.1em;
	margin-inline-start: 0.5em;
	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='%23000' stroke-width='2.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7'/%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='%23000' stroke-width='2.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7'/%3E%3C/svg%3E") center / contain no-repeat;
	position: static;
	font-family: inherit;
}

@media (prefers-reduced-motion: no-preference) {
	.sm-card .wc-block-components-product-button__button.added::after {
		animation: sm-pop 420ms var(--wp--custom--motion--spring) both;
	}
}

@keyframes sm-pop {
	from { transform: scale(0); }
}

.sm-card .added_to_cart,
.sm-card .wc-block-components-product-button__button + a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: var(--sm-tap);
	font-weight: 600;
	text-align: center;
}

/* Sale badge */
.wc-block-components-product-sale-badge {
	z-index: 2;
	margin: 0.6rem !important;
	padding: 0.3rem 0.7rem !important;
	border: 0 !important;
	border-radius: 999px !important;
	background: var(--wp--preset--color--alert) !important;
	color: #fff !important;
	font-family: var(--wp--preset--font-family--display);
	font-size: 0.95rem !important;
	font-weight: 700;
	text-transform: none !important;
}

/* Native WooCommerce stars (ratings in cards, product page, reviews) */
.wc-block-components-product-rating__stars,
.star-rating {
	color: var(--wp--preset--color--star);
}

.star-rating::before,
.wc-block-components-product-rating__stars::before {
	color: var(--wp--preset--color--line-strong);
	opacity: 1;
}

/* ---------- Catalogue page ---------- */

.sm-catalogue-page .woocommerce-breadcrumb,
.sm-product .woocommerce-breadcrumb {
	margin-block: var(--wp--preset--spacing--30) 0 !important;
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--ink-soft);
}

.woocommerce-breadcrumb a {
	display: inline-flex;
	align-items: center;
	min-height: var(--sm-tap);
	color: var(--wp--preset--color--ink);
}

.sm-crumb-sep {
	margin-inline: 0.5rem;
	color: var(--wp--preset--color--line-strong);
}

.sm-catalogue__head {
	margin-block: var(--wp--preset--spacing--20) var(--wp--preset--spacing--40);
}

.sm-catalogue__head .wp-block-query-title {
	margin: 0;
	font-size: var(--wp--preset--font-size--xx-large);
}

.sm-catalogue__head .wp-block-term-description {
	max-width: 65ch;
	margin-top: 0.75rem;
	color: var(--wp--preset--color--ink-soft);
}

.sm-catalogue {
	display: grid;
	gap: var(--wp--preset--spacing--40);
}

@media (min-width: 64rem) {
	.sm-catalogue {
		grid-template-columns: 17rem minmax(0, 1fr);
		gap: var(--wp--preset--spacing--60);
		align-items: start;
	}

	.sm-catalogue__aside {
		padding-right: 0.25rem;
	}
}

.sm-catalogue__results > * {
	margin-top: 0;
}

.woocommerce-result-count,
.wc-block-product-results-count {
	margin: 0 0 var(--wp--preset--spacing--30) !important;
	color: var(--wp--preset--color--ink-soft);
	font-size: var(--wp--preset--font-size--small);
}

/* Pagination */
.sm-pagination {
	margin-top: var(--wp--preset--spacing--50);
	gap: 0.5rem;
	flex-wrap: wrap;
}

.sm-pagination a,
.sm-pagination .page-numbers {
	display: inline-grid;
	place-items: center;
	min-inline-size: 48px;
	min-block-size: 48px;
	padding-inline: 0.85rem;
	border: 2px solid var(--wp--preset--color--line-strong);
	border-radius: var(--sm-radius-m);
	color: var(--wp--preset--color--ink);
	font-weight: 600;
	text-decoration: none;
}

.sm-pagination a:hover {
	border-color: var(--wp--preset--color--ink);
}

.sm-pagination .page-numbers.current {
	background: var(--wp--preset--color--ink);
	border-color: var(--wp--preset--color--ink);
	color: var(--wp--preset--color--paper);
}

.sm-pagination .page-numbers.dots {
	border: 0;
}

.sm-empty {
	max-width: 36rem;
	padding: var(--wp--preset--spacing--50) 0;
}

/* ---------- Filters ---------- */

.sm-filters__toggle {
	inline-size: 100%;
	justify-content: space-between;
}

.sm-filters__toggle .sm-badge {
	margin-inline-start: auto;
}

.sm-filters__head {
	display: none;
}

.sm-filters__group {
	margin: 0 0 1.5rem;
	padding: 0;
	border: 0;
	display: grid;
	gap: 0.15rem;
}

.sm-filters__label {
	display: block;
	margin: 0 0 0.5rem;
	padding: 0;
	font-family: var(--wp--preset--font-family--display);
	font-size: var(--wp--preset--font-size--medium);
	font-weight: 700;
	letter-spacing: 0;
}

.sm-filters__submit {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	padding-top: 0.5rem;
}

.sm-filters__submit .sm-btn--primary {
	flex: 1 1 auto;
}

.sm-chips {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.sm-chip {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	min-height: var(--sm-tap);
	padding: 0.35rem 0.9rem;
	border: 1.5px solid var(--wp--preset--color--line-strong);
	border-radius: 999px;
	background: var(--wp--preset--color--surface);
	color: var(--wp--preset--color--ink);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
	text-decoration: none;
	transition: background-color var(--sm-fast) var(--sm-ease), border-color var(--sm-fast) var(--sm-ease);
}

.sm-chip:hover {
	border-color: var(--wp--preset--color--ink);
}

.sm-chip.is-active {
	background: var(--wp--preset--color--green-tint);
	border-color: var(--wp--preset--color--green);
}

.sm-chip--plain {
	border-color: transparent;
	background: transparent;
	text-decoration: underline;
}

.sm-chip__count {
	color: var(--wp--preset--color--ink-soft);
	font-weight: 400;
}

.sm-filters__active {
	margin-block: 0.75rem;
}

.sm-filters__scrim {
	display: none;
}

/* Desktop: panel always shown, toggle hidden. */
@media (min-width: 64rem) {
	.sm-filters__toggle {
		display: none;
	}

	.sm-filters__active {
		margin-top: 0;
		margin-bottom: 1.25rem;
	}
}

/* Phones and tablets: the panel becomes a sheet when JavaScript runs (class set before first paint).
   Without JavaScript the filters simply show inline. */
@media (max-width: 63.99rem) {
	html.sm-js .sm-filters .sm-filters__panel {
		position: fixed;
		inset: auto 0 0 0;
		z-index: 200;
		max-block-size: 88dvh;
		overflow-y: auto;
		padding: 0 var(--wp--preset--spacing--40) calc(1rem + env(safe-area-inset-bottom));
		border-radius: var(--sm-radius-l) var(--sm-radius-l) 0 0;
		background: var(--wp--preset--color--paper);
		box-shadow: 0 -16px 40px -12px rgb(0 0 0 / 0.35);
		transform: translateY(105%);
		visibility: hidden;
		transition: transform var(--sm-slow) var(--sm-ease), visibility 0s linear var(--sm-slow);
	}

	html.sm-js .sm-filters.is-open .sm-filters__panel {
		transform: none;
		visibility: visible;
		transition: transform var(--sm-slow) var(--sm-ease), visibility 0s;
	}

	html.sm-js .sm-filters .sm-filters__head {
		position: sticky;
		top: 0;
		z-index: 1;
		display: flex;
		align-items: center;
		justify-content: space-between;
		margin: 0 calc(var(--wp--preset--spacing--40) * -1) 1rem;
		padding: 0.75rem var(--wp--preset--spacing--40);
		background: var(--wp--preset--color--paper);
		border-bottom: 1px solid var(--wp--preset--color--line);
	}

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

	html.sm-js .sm-filters .sm-filters__submit {
		position: sticky;
		bottom: calc(-1rem - env(safe-area-inset-bottom));
		margin: 0 calc(var(--wp--preset--spacing--40) * -1);
		padding: 0.75rem var(--wp--preset--spacing--40) calc(0.75rem + env(safe-area-inset-bottom));
		background: var(--wp--preset--color--paper);
		border-top: 1px solid var(--wp--preset--color--line);
	}

	html.sm-js .sm-filters.is-open .sm-filters__scrim {
		display: block;
		position: fixed;
		inset: 0;
		z-index: 199;
		background: rgb(16 14 11 / 0.5);
	}

	html:not(.sm-js) .sm-filters__toggle {
		display: none;
	}
}

/* ---------- Single product ---------- */

.sm-product__top {
	display: grid;
	gap: var(--wp--preset--spacing--50);
	margin-top: var(--wp--preset--spacing--30);
}

@media (min-width: 56rem) {
	.sm-product__top {
		grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
		gap: var(--wp--preset--spacing--60);
		align-items: start;
	}

	.sm-product__summary {
		position: sticky;
		top: calc(var(--sm-header-h) + 3rem);
	}
}

.sm-product__summary > * {
	margin-block: 0 1.1rem;
}

.sm-product__title {
	font-size: var(--wp--preset--font-size--xx-large);
	line-height: 1.05;
	letter-spacing: -0.03em;
}

.sm-product__price {
	font-family: var(--wp--preset--font-family--display);
	font-weight: 800;
}

.sm-product__excerpt {
	color: var(--wp--preset--color--ink-soft);
}

.sm-product__excerpt .wp-block-post-excerpt__more-text {
	display: none;
}

/* Gallery (WooCommerce classic gallery with zoom + lightbox) */
.sm-product__gallery .woocommerce-product-gallery {
	position: relative;
	margin: 0 !important;
	width: 100% !important;
	float: none !important;
}

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

.sm-product__gallery .woocommerce-product-gallery__image,
.sm-product__gallery .flex-viewport {
	border-radius: var(--sm-radius-l);
	background: var(--sm-board-light);
	overflow: hidden;
}

.sm-product__gallery .woocommerce-product-gallery__image img {
	mix-blend-mode: multiply;
}

.sm-product__gallery .flex-control-thumbs {
	display: grid !important;
	grid-template-columns: repeat(auto-fill, minmax(4.5rem, 1fr));
	gap: 0.6rem;
	margin: 0.75rem 0 0 !important;
	padding: 0;
	list-style: none;
}

.sm-product__gallery .flex-control-thumbs li {
	inline-size: auto !important;
	float: none !important;
	margin: 0 !important;
}

.sm-product__gallery .flex-control-thumbs img {
	aspect-ratio: 1;
	object-fit: contain;
	border-radius: var(--sm-radius-m);
	background: var(--sm-board-light);
	mix-blend-mode: multiply;
	border: 2px solid transparent;
	opacity: 1 !important;
	cursor: pointer;
	transition: border-color var(--sm-fast) var(--sm-ease);
}

.sm-product__gallery .flex-control-thumbs img.flex-active,
.sm-product__gallery .flex-control-thumbs img:hover {
	border-color: var(--wp--preset--color--ink);
}

.sm-product__gallery .woocommerce-product-gallery__trigger {
	position: absolute;
	top: 0.75rem !important;
	right: 0.75rem !important;
	z-index: 9;
	display: grid !important;
	place-items: center;
	inline-size: 48px !important;
	block-size: 48px !important;
	border-radius: var(--sm-radius-m) !important;
	background: var(--wp--preset--color--surface) !important;
	box-shadow: var(--wp--preset--shadow--raised);
	font-size: 0 !important;
	text-indent: 0 !important;
}

.sm-product__gallery .woocommerce-product-gallery__trigger::before {
	content: "" !important;
	position: static !important;
	inline-size: 24px !important;
	block-size: 24px !important;
	border: 0 !important;
	border-radius: 0 !important;
	background: var(--wp--preset--color--ink);
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.75' stroke-linecap='round'%3E%3Ccircle cx='10.5' cy='10.5' r='6.25'/%3E%3Cpath d='m15.25 15.25 5 5M10.5 8v5M8 10.5h5'/%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='%23000' stroke-width='1.75' stroke-linecap='round'%3E%3Ccircle cx='10.5' cy='10.5' r='6.25'/%3E%3Cpath d='m15.25 15.25 5 5M10.5 8v5M8 10.5h5'/%3E%3C/svg%3E") center / contain no-repeat;
}

.sm-product__gallery .woocommerce-product-gallery__trigger::after {
	display: none !important;
}

.sm-product__gallery .woocommerce-product-gallery__trigger img {
	display: none !important;
}

/* Add to cart form */
.sm-product__cart form.cart {
	display: flex !important;
	flex-wrap: wrap;
	align-items: stretch;
	gap: 0.75rem;
	margin: 0 !important;
}

.sm-product__cart form.cart::before,
.sm-product__cart form.cart::after {
	display: none !important;
}

.sm-product__cart .quantity {
	display: flex;
	margin: 0 !important;
}

.sm-product__cart .quantity .qty {
	width: 5rem !important;
	margin: 0 !important;
	min-height: 56px;
	text-align: center;
	font-family: var(--wp--preset--font-family--display);
	font-size: var(--wp--preset--font-size--large);
	font-weight: 700;
}

.sm-product__cart .single_add_to_cart_button {
	flex: 1 1 12rem;
	float: none !important;
	width: auto !important;
	min-height: 56px;
	margin: 0 !important;
	padding-inline: 1.5rem !important;
	border-radius: var(--sm-radius-m) !important;
	background: var(--wp--preset--color--green) !important;
	color: var(--wp--preset--color--on-green) !important;
	font-family: var(--wp--preset--font-family--display) !important;
	font-size: var(--wp--preset--font-size--medium) !important;
	font-weight: 700 !important;
}

.sm-product__cart .single_add_to_cart_button:hover {
	background: var(--wp--preset--color--green-deep) !important;
}

.sm-product__cart .single_add_to_cart_button.disabled {
	opacity: 0.55;
}

.sm-product__cart .stock {
	inline-size: 100%;
	margin: 0;
	font-weight: 600;
}

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

.sm-product__cart .stock.in-stock {
	display: none; /* shown in the delivery box instead */
}

.sm-product__rating .wc-block-components-product-rating__link {
	min-height: var(--sm-tap);
	display: inline-flex;
	align-items: center;
}

/* Stock + delivery box */
.sm-delivery {
	display: grid;
	gap: 1rem;
	padding: var(--wp--preset--spacing--40);
	border: 1px solid var(--wp--preset--color--line);
	border-radius: var(--sm-radius-l);
	background: var(--wp--preset--color--surface);
}

.sm-delivery > * {
	margin: 0;
}

.sm-delivery__stock {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	font-weight: 700;
	color: var(--wp--preset--color--green);
}

.sm-delivery__stock.is-out {
	color: var(--wp--preset--color--alert);
}

.sm-delivery__stock.is-backorder {
	color: var(--wp--preset--color--star);
}

.sm-delivery__options,
.sm-delivery__promises {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 0.65rem;
}

.sm-delivery__options li {
	display: grid;
	grid-template-columns: auto 1fr auto;
	align-items: start;
	column-gap: 0.65rem;
}

.sm-delivery__options .sm-icon,
.sm-delivery__promises .sm-icon {
	margin-top: 0.2rem;
	color: var(--wp--preset--color--ink-soft);
}

.sm-delivery__time {
	color: var(--wp--preset--color--ink-soft);
}

.sm-delivery__price {
	font-weight: 700;
	white-space: nowrap;
}

.sm-delivery__free {
	grid-column: 2 / -1;
	color: var(--wp--preset--color--green);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
}

.sm-delivery__promises {
	padding-top: 1rem;
	border-top: 1px solid var(--wp--preset--color--line);
	font-size: var(--wp--preset--font-size--small);
}

.sm-delivery__promises li {
	display: flex;
	gap: 0.6rem;
}

/* Description + specs */
.sm-product__details {
	display: grid;
	gap: var(--wp--preset--spacing--50);
	margin-top: var(--wp--preset--spacing--70);
	padding-top: var(--wp--preset--spacing--50);
	border-top: 1px solid var(--wp--preset--color--line);
}

@media (min-width: 56rem) {
	.sm-product__details {
		grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
		gap: var(--wp--preset--spacing--60);
	}
}

.sm-product__desc > h2,
.sm-specs > h2 {
	margin-top: 0;
}

.sm-specs__list {
	margin: 0;
	border-top: 1px solid var(--wp--preset--color--line);
}

.sm-specs__row {
	display: grid;
	grid-template-columns: minmax(8rem, 40%) 1fr;
	gap: 1rem;
	padding: 0.85rem 0;
	border-bottom: 1px solid var(--wp--preset--color--line);
}

.sm-specs__row dt {
	color: var(--wp--preset--color--ink-soft);
}

.sm-specs__row dd {
	margin: 0;
	font-weight: 600;
}

/* Product reviews */
.sm-product-reviews {
	display: grid;
	gap: var(--wp--preset--spacing--50);
	margin-top: var(--wp--preset--spacing--70);
	padding-top: var(--wp--preset--spacing--50);
	border-top: 1px solid var(--wp--preset--color--line);
}

@media (min-width: 56rem) {
	.sm-product-reviews {
		grid-template-columns: 20rem minmax(0, 1fr);
		gap: var(--wp--preset--spacing--60);
	}
}

.sm-product-reviews__aside > h2 {
	margin-top: 0;
}

.sm-product-reviews__none {
	color: var(--wp--preset--color--ink-soft);
}

.sm-bars {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 0.4rem;
}

.sm-bars li {
	display: grid;
	grid-template-columns: 7.5rem 1fr 2rem;
	align-items: center;
	gap: 0.6rem;
	font-size: var(--wp--preset--font-size--small);
}

.sm-bars__track {
	block-size: 0.6rem;
	border-radius: 999px;
	background: var(--wp--preset--color--sunken);
	overflow: hidden;
}

.sm-bars__track span {
	display: block;
	block-size: 100%;
	background: var(--wp--preset--color--star);
	border-radius: inherit;
}

.sm-bars__count {
	text-align: end;
	color: var(--wp--preset--color--ink-soft);
}

/* WooCommerce review list + form inside our section */
.sm-product-reviews #reviews {
	margin: 0;
}

.sm-product-reviews .woocommerce-Reviews-title {
	display: none; /* the section heading already says it */
}

.sm-product-reviews #comments > .woocommerce-noreviews {
	margin: 0 0 1.5rem;
	padding: 1rem 1.25rem;
	border-radius: var(--sm-radius-m);
	background: var(--wp--preset--color--sunken);
}

.sm-product-reviews .commentlist {
	list-style: none;
	margin: 0 0 var(--wp--preset--spacing--50) !important;
	padding: 0 !important;
	display: grid;
	gap: 1rem;
}

.sm-product-reviews .commentlist li {
	margin: 0 !important;
}

.sm-product-reviews .comment_container {
	display: flex;
	gap: 1rem;
	padding: var(--wp--preset--spacing--40);
	border: 1px solid var(--wp--preset--color--line);
	border-radius: var(--sm-radius-l);
	background: var(--wp--preset--color--surface);
}

.sm-product-reviews .comment_container img.avatar {
	position: static !important;
	flex: none;
	align-self: flex-start;
	inline-size: 3rem !important;
	block-size: 3rem !important;
	aspect-ratio: 1;
	object-fit: cover;
	border-radius: 50%;
	border: 0 !important;
	padding: 0 !important;
	background: var(--wp--preset--color--sunken) !important;
}

.sm-product-reviews .comment-text {
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	flex: 1;
}

.sm-product-reviews .comment-text .meta {
	color: var(--wp--preset--color--ink-soft) !important;
	font-size: var(--wp--preset--font-size--small) !important;
}

.sm-product-reviews .woocommerce-review__author {
	color: var(--wp--preset--color--ink);
}

.sm-product-reviews .woocommerce-review__verified {
	color: var(--wp--preset--color--green);
	font-style: normal;
	font-weight: 600;
}

.sm-product-reviews #review_form_wrapper {
	padding: var(--wp--preset--spacing--40);
	border-radius: var(--sm-radius-l);
	background: var(--wp--preset--color--sunken);
}

.sm-product-reviews .comment-reply-title {
	display: block;
	margin-bottom: 0.75rem;
	font-family: var(--wp--preset--font-family--display);
	font-size: var(--wp--preset--font-size--large);
	font-weight: 700;
}

.sm-product-reviews .comment-form > p {
	margin: 0 0 1rem;
}

.sm-product-reviews .comment-form label {
	display: block;
	margin-bottom: 0.35rem;
}

.sm-product-reviews .comment-form input:not([type="checkbox"]):not([type="submit"]),
.sm-product-reviews .comment-form textarea {
	inline-size: 100%;
}

.sm-product-reviews .comment-form-cookies-consent {
	display: flex;
	gap: 0.6rem;
	align-items: flex-start;
}

.sm-product-reviews .comment-form-cookies-consent label {
	font-weight: 400;
}

/* Rating picker: big tap targets */
.sm-product-reviews p.stars {
	margin: 0.25rem 0 0;
}

.sm-product-reviews p.stars span {
	display: inline-flex;
	gap: 0.25rem;
}

.sm-product-reviews p.stars a {
	inline-size: 44px !important;
	block-size: 44px !important;
	font-size: 1.75rem;
	line-height: 44px;
	color: var(--wp--preset--color--star) !important;
}

.sm-product-reviews p.stars a::before {
	inline-size: 44px !important;
	block-size: 44px !important;
	line-height: 44px !important;
}

.sm-product-reviews .form-submit input[type="submit"],
.sm-product-reviews #submit {
	min-height: var(--sm-btn-h);
	padding: 0.8rem 1.6rem;
	border: 2px solid var(--wp--preset--color--green) !important;
	border-radius: var(--sm-radius-m) !important;
	background: var(--wp--preset--color--green) !important;
	color: var(--wp--preset--color--on-green) !important;
	font-family: var(--wp--preset--font-family--display);
	font-weight: 700;
	cursor: pointer;
}

.sm-related {
	padding-bottom: 0;
	margin-top: var(--wp--preset--spacing--50);
}

/* Sticky add to cart: phones only, appears once the main button scrolls away. */
.sm-sticky {
	display: none;
}

@media (max-width: 55.99rem) {
	.sm-sticky {
		position: fixed;
		inset: auto 0 0 0;
		z-index: 90;
		display: flex;
		align-items: center;
		gap: 0.75rem;
		padding: 0.65rem var(--wp--preset--spacing--40) calc(0.65rem + env(safe-area-inset-bottom));
		background: var(--wp--preset--color--surface);
		border-top: 1px solid var(--wp--preset--color--line-strong);
		box-shadow: 0 -10px 30px -16px rgb(0 0 0 / 0.4);
		transform: translateY(110%);
		transition: transform var(--sm-slow) var(--sm-ease);
	}

	.sm-sticky.is-visible {
		transform: none;
	}

	.sm-sticky__info {
		display: grid;
		min-inline-size: 0;
		flex: 1;
	}

	.sm-sticky__name {
		overflow: hidden;
		white-space: nowrap;
		text-overflow: ellipsis;
		font-size: var(--wp--preset--font-size--small);
	}

	.sm-sticky__price {
		font-family: var(--wp--preset--font-family--display);
		font-weight: 800;
		font-size: var(--wp--preset--font-size--large);
	}

	.sm-sticky .sm-btn {
		flex: none;
	}

	.sm-product {
		padding-bottom: 7rem;
	}
}

/* ---------- Quick view dialog ---------- */

.sm-qv {
	inline-size: min(56rem, calc(100vw - 2rem));
	max-block-size: calc(100dvh - 2rem);
	margin: auto;
	padding: 0;
	border: 0;
	border-radius: var(--sm-radius-l);
	background: var(--wp--preset--color--paper);
	color: var(--wp--preset--color--ink);
	box-shadow: var(--wp--preset--shadow--lift);
	overflow: auto;
}

.sm-qv::backdrop {
	background: rgb(16 14 11 / 0.55);
}

@media (prefers-reduced-motion: no-preference) {
	.sm-qv[open] {
		animation: sm-dialog-in var(--sm-base) var(--sm-ease);
	}

	.sm-qv[open]::backdrop {
		animation: sm-fade-in var(--sm-base) var(--sm-ease);
	}
}

@keyframes sm-dialog-in {
	from { opacity: 0; transform: translateY(14px) scale(0.98); }
}

@keyframes sm-fade-in {
	from { opacity: 0; }
}

.sm-qv__inner {
	position: relative;
	padding: var(--wp--preset--spacing--40);
}

.sm-qv__close {
	position: absolute;
	top: 0.75rem;
	right: 0.75rem;
	z-index: 1;
}

.sm-qv__loading,
.sm-qv__error {
	margin: 2rem 0;
	padding-right: 3.5rem;
	font-weight: 600;
}

.sm-qv__error {
	color: var(--wp--preset--color--alert);
}

.sm-qv__grid {
	display: grid;
	gap: var(--wp--preset--spacing--40);
}

@media (min-width: 48rem) {
	.sm-qv__grid {
		grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
		align-items: start;
	}
}

.sm-qv__media {
	margin: 0;
	border-radius: var(--sm-radius-l);
	background: var(--sm-board-light);
	overflow: hidden;
}

.sm-qv__media img {
	box-sizing: border-box;
	display: block;
	inline-size: 100%;
	aspect-ratio: 1;
	object-fit: contain;
	padding: 6%;
	mix-blend-mode: multiply;
}

.sm-qv__body > * {
	margin: 0 0 0.85rem;
}

.sm-qv__title {
	padding-right: 3.5rem;
	font-size: var(--wp--preset--font-size--x-large);
}

.sm-qv__price {
	font-family: var(--wp--preset--font-family--display);
	font-size: var(--wp--preset--font-size--x-large);
	font-weight: 800;
}

.sm-qv__price del {
	color: var(--wp--preset--color--ink-soft);
	font-size: 0.7em;
	font-weight: 400;
}

.sm-qv__stock {
	font-weight: 700;
	color: var(--wp--preset--color--green);
}

.sm-qv__stock.is-out {
	color: var(--wp--preset--color--alert);
}

.sm-qv__desc {
	color: var(--wp--preset--color--ink-soft);
}

.sm-qv__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
}

.sm-qv__actions .sm-btn {
	flex: 1 1 12rem;
}

.sm-qv .sm-btn.is-added {
	background: var(--wp--preset--color--green-deep);
	border-color: var(--wp--preset--color--green-deep);
}

.sm-qv__status {
	min-block-size: 1.5em;
	font-weight: 600;
}

/* ---------- Drawer (WooCommerce block drawers) ---------- */

.wc-block-components-drawer {
	max-inline-size: min(28rem, 100vw) !important;
	background: var(--wp--preset--color--paper) !important;
	color: var(--wp--preset--color--ink) !important;
	box-shadow: var(--wp--preset--shadow--drawer);
}

.wc-block-components-drawer__screen-overlay {
	background-color: rgb(16 14 11 / 0.5) !important;
}

.wc-block-mini-cart__title {
	font-family: var(--wp--preset--font-family--display);
	font-size: var(--wp--preset--font-size--x-large) !important;
	font-weight: 750;
	letter-spacing: -0.02em;
}

.wc-block-components-drawer__close {
	inline-size: 48px;
	block-size: 48px;
	display: grid !important;
	place-items: center;
	border-radius: var(--sm-radius-m);
	color: var(--wp--preset--color--ink) !important;
	opacity: 1 !important;
}

.wc-block-components-drawer__close:hover {
	background: var(--wp--preset--color--sunken);
}

.wc-block-mini-cart__products-table .wc-block-cart-items__row,
.wc-block-cart-items .wc-block-cart-items__row {
	border-color: var(--wp--preset--color--line) !important;
}

.wc-block-mini-cart__footer {
	border-top: 1px solid var(--wp--preset--color--line);
	background: var(--wp--preset--color--surface);
}

.wc-block-mini-cart__footer-actions .wc-block-components-button {
	min-height: var(--sm-btn-h);
}

/* ---------- Shared WooCommerce block buttons (cart, checkout, mini-cart) ---------- */

.wc-block-components-button:not(.is-link) {
	min-height: var(--sm-btn-h);
	border: 2px solid var(--wp--preset--color--green) !important;
	border-radius: var(--sm-radius-m) !important;
	background: var(--wp--preset--color--green) !important;
	color: var(--wp--preset--color--on-green) !important;
	font-family: var(--wp--preset--font-family--display) !important;
	font-size: var(--wp--preset--font-size--medium) !important;
	font-weight: 700 !important;
	box-shadow: none !important;
	transition: background-color var(--sm-fast) var(--sm-ease), transform var(--sm-fast) var(--sm-ease);
}

.wc-block-components-button:not(.is-link):hover {
	background: var(--wp--preset--color--green-deep) !important;
	border-color: var(--wp--preset--color--green-deep) !important;
}

.wc-block-components-button:not(.is-link):active {
	transform: translateY(1px) scale(0.985);
}

.wc-block-components-button:not(.is-link):focus-visible {
	outline: var(--wp--custom--focus--width) solid var(--wp--preset--color--ink) !important;
	outline-offset: var(--wp--custom--focus--offset);
}

.wc-block-components-button.outlined,
.wc-block-mini-cart__footer-cart.wc-block-components-button {
	background: transparent !important;
	border-color: var(--wp--preset--color--ink) !important;
	color: var(--wp--preset--color--ink) !important;
}

.wc-block-components-button.outlined:hover,
.wc-block-mini-cart__footer-cart.wc-block-components-button:hover {
	background: var(--wp--preset--color--ink) !important;
	color: var(--wp--preset--color--paper) !important;
}

.wc-block-components-button[disabled] {
	opacity: 0.55 !important;
}

/* Loading state while WooCommerce processes the action */
.wc-block-components-button .wc-block-components-spinner::after {
	border-color: currentColor !important;
	border-right-color: transparent !important;
}

/* ---------- Cart + checkout ---------- */

.sm-cart-page > .wp-block-post-title,
.sm-checkout-page > .wp-block-post-title {
	margin-block: var(--wp--preset--spacing--30) var(--wp--preset--spacing--40);
}

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

.wc-block-components-sidebar-layout {
	margin-bottom: 0 !important;
}

.wc-block-components-title.wc-block-components-title,
.wc-block-components-checkout-step__title {
	font-family: var(--wp--preset--font-family--display) !important;
	font-size: var(--wp--preset--font-size--large) !important;
	font-weight: 700 !important;
	letter-spacing: -0.01em;
}

.wc-block-components-checkout-step__heading-content,
.wc-block-components-checkout-step__description {
	color: var(--wp--preset--color--ink-soft);
	font-size: var(--wp--preset--font-size--small) !important;
}

/* Numbered checkout steps */
.wc-block-components-form .wc-block-components-checkout-step--with-step-number .wc-block-components-checkout-step__title::before {
	display: inline-grid !important;
	place-items: center;
	inline-size: 2.1rem;
	block-size: 2.1rem;
	margin-inline-end: 0.6rem;
	border-radius: 50%;
	background: var(--wp--preset--color--green);
	color: var(--wp--preset--color--on-green);
	font-size: 1rem;
	vertical-align: 0.1em;
}

.wc-block-components-form .wc-block-components-checkout-step--with-step-number .wc-block-components-checkout-step__container::after {
	border-color: var(--wp--preset--color--line) !important;
}

/* Fields */
.wc-block-components-text-input input,
.wc-block-components-form .wc-block-components-text-input input,
.wc-blocks-components-select .wc-blocks-components-select__select,
.wc-block-components-combobox .wc-block-components-combobox-control input,
.wc-block-components-textarea {
	min-height: 3.6rem !important;
	border: 2px solid var(--wp--preset--color--line-strong) !important;
	border-radius: var(--sm-radius-m) !important;
	background: var(--wp--preset--color--surface) !important;
	color: var(--wp--preset--color--ink) !important;
	font-size: var(--wp--preset--font-size--medium) !important;
}

/* The select's wrapper has a white 4px-radius background in WooCommerce; it showed at the field's rounded corners. */
.wc-blocks-components-select .wc-blocks-components-select__container {
	background: transparent !important;
	border-radius: var(--sm-radius-m) !important;
}

.wc-block-components-text-input input:focus,
.wc-blocks-components-select .wc-blocks-components-select__select:focus,
.wc-block-components-combobox .wc-block-components-combobox-control input:focus {
	border-color: var(--wp--preset--color--green) !important;
	box-shadow: 0 0 0 3px var(--wp--preset--color--green-tint) !important;
	outline: none !important;
}

.wc-block-components-text-input label,
.wc-blocks-components-select__label,
.wc-block-components-combobox .wc-block-components-combobox-control label {
	color: var(--wp--preset--color--ink-soft) !important;
	font-size: var(--wp--preset--font-size--small) !important;
	font-weight: 400;
}

.wc-block-components-text-input.has-error input,
.wc-block-components-validation-error {
	border-color: var(--wp--preset--color--alert) !important;
	color: var(--wp--preset--color--alert) !important;
}

.wc-block-components-validation-error > p {
	font-size: var(--wp--preset--font-size--small) !important;
	font-weight: 600;
}

/* Radio + checkbox controls: bigger */
.wc-block-components-radio-control__input,
.wc-block-components-checkbox__input[type="checkbox"] {
	inline-size: 1.5rem !important;
	block-size: 1.5rem !important;
	min-inline-size: 1.5rem !important;
	border-color: var(--wp--preset--color--line-strong) !important;
}

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

.wc-block-components-radio-control__input:checked::before {
	background: var(--wp--preset--color--green) !important;
}

.wc-block-components-checkbox__input[type="checkbox"]:checked {
	background: var(--wp--preset--color--green) !important;
	border-color: var(--wp--preset--color--green) !important;
}

.wc-block-components-checkbox__mark {
	fill: var(--wp--preset--color--on-green) !important;
}

.wc-block-components-radio-control--highlight-checked .wc-block-components-radio-control-accordion-option,
.wc-block-components-radio-control--highlight-checked label.wc-block-components-radio-control__option {
	border-radius: var(--sm-radius-m);
}

.wc-block-components-radio-control--highlight-checked::after,
.wc-block-components-radio-control--highlight-checked div.wc-block-components-radio-control-accordion-option--checked-option-highlighted,
.wc-block-components-radio-control--highlight-checked label.wc-block-components-radio-control__option--checked-option-highlighted {
	box-shadow: inset 0 0 0 2px var(--wp--preset--color--green) !important;
	border-radius: var(--sm-radius-m);
}

/* Totals */
.wc-block-components-totals-wrapper {
	border-color: var(--wp--preset--color--line) !important;
}

.wc-block-components-totals-footer-item .wc-block-components-totals-item__label,
.wc-block-components-totals-footer-item .wc-block-components-totals-item__value {
	font-family: var(--wp--preset--font-family--display);
	font-size: var(--wp--preset--font-size--x-large) !important;
	font-weight: 800 !important;
}

.wc-block-components-totals-footer-item-tax {
	color: var(--wp--preset--color--ink-soft);
	font-size: var(--wp--preset--font-size--small) !important;
}

.wp-block-woocommerce-cart-order-summary-block,
.wp-block-woocommerce-checkout-order-summary-block {
	border: 1px solid var(--wp--preset--color--line) !important;
	border-radius: var(--sm-radius-l);
	background: var(--wp--preset--color--surface);
	overflow: hidden;
}

.wc-block-cart__submit-container .wc-block-components-button,
.wc-block-components-checkout-place-order-button {
	min-height: 3.75rem !important;
	font-size: var(--wp--preset--font-size--large) !important;
}

/* Cart line items */
.wc-block-cart-item__image img,
.wc-block-components-order-summary-item__image img {
	border-radius: var(--sm-radius-m);
	background: var(--sm-board-light);
	mix-blend-mode: multiply;
}

.wc-block-components-product-name {
	color: var(--wp--preset--color--ink) !important;
	font-family: var(--wp--preset--font-family--display);
	font-weight: 650;
	font-size: var(--wp--preset--font-size--medium) !important;
	text-decoration: none;
}

.wc-block-components-quantity-selector {
	min-height: 48px;
	border-radius: var(--sm-radius-m) !important;
	border-color: var(--wp--preset--color--line-strong) !important;
}

.wc-block-components-quantity-selector::after {
	border-color: var(--wp--preset--color--line-strong) !important;
	border-radius: var(--sm-radius-m) !important;
}

.wc-block-components-quantity-selector .wc-block-components-quantity-selector__button {
	min-inline-size: 44px !important;
	font-size: 1.35rem !important;
	color: var(--wp--preset--color--ink) !important;
	opacity: 1 !important;
}

.wc-block-components-quantity-selector input.wc-block-components-quantity-selector__input {
	font-size: var(--wp--preset--font-size--medium) !important;
	font-weight: 700 !important;
	color: var(--wp--preset--color--ink) !important;
}

.wc-block-cart-item__remove-link {
	min-height: var(--sm-tap);
	display: inline-flex !important;
	align-items: center;
	color: var(--wp--preset--color--ink-soft) !important;
	font-size: var(--wp--preset--font-size--small) !important;
	text-decoration: underline !important;
}

/* Notices */
.wc-block-components-notice-banner {
	border-radius: var(--sm-radius-m) !important;
	font-size: var(--wp--preset--font-size--medium) !important;
}

.wc-block-components-notice-banner.is-success {
	background: var(--wp--preset--color--green-tint) !important;
	border-color: var(--wp--preset--color--green) !important;
	color: var(--wp--preset--color--ink) !important;
}

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

.wc-block-components-notice-banner .wc-forward {
	min-height: var(--sm-tap);
	display: inline-flex !important;
	align-items: center;
	font-weight: 700 !important;
	color: var(--wp--preset--color--green) !important;
	opacity: 1 !important;
}

.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
	border-top-color: var(--wp--preset--color--green) !important;
	background: var(--wp--preset--color--surface) !important;
	color: var(--wp--preset--color--ink) !important;
}

.woocommerce-message::before,
.woocommerce-info::before {
	color: var(--wp--preset--color--green) !important;
}

/* Dark-mode fixes for WooCommerce components that hard-code white */
@media (prefers-color-scheme: dark) {
	.wc-block-components-text-input input,
	.wc-blocks-components-select .wc-blocks-components-select__select,
	.wc-block-components-combobox .wc-block-components-combobox-control input,
	.wc-block-components-form .wc-block-components-text-input input:-webkit-autofill {
		color-scheme: dark;
	}

	.wc-block-components-radio-control__input,
	.wc-block-components-checkbox__input[type="checkbox"] {
		background: var(--wp--preset--color--surface) !important;
	}

	.wc-block-components-panel__button,
	.wc-block-components-totals-item,
	.wc-block-components-product-metadata,
	.wc-block-components-formatted-money-amount {
		color: var(--wp--preset--color--ink) !important;
	}
}

/* ---------- My account ---------- */

.woocommerce-account .sm-page .wp-block-post-content,
.woocommerce-account .sm-help__content .wp-block-post-content {
	max-width: none;
}

.woocommerce-account .woocommerce {
	display: grid;
	gap: var(--wp--preset--spacing--50);
}

@media (min-width: 56rem) {
	.woocommerce-account.logged-in .woocommerce {
		grid-template-columns: 16rem minmax(0, 1fr);
		align-items: start;
	}
}

.woocommerce-account .woocommerce::before,
.woocommerce-account .woocommerce::after {
	display: none !important;
}

.woocommerce-MyAccount-navigation,
.woocommerce-MyAccount-content {
	float: none !important;
	inline-size: auto !important;
}

.woocommerce-MyAccount-navigation ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 0.25rem;
}

.woocommerce-MyAccount-navigation a {
	display: flex;
	align-items: center;
	min-height: 48px;
	padding: 0.5rem 1rem;
	border-radius: var(--sm-radius-m);
	color: var(--wp--preset--color--ink);
	font-weight: 600;
	text-decoration: none;
}

.woocommerce-MyAccount-navigation a:hover {
	background: var(--wp--preset--color--sunken);
}

.woocommerce-MyAccount-navigation .is-active a {
	background: var(--wp--preset--color--green-tint);
	box-shadow: inset 4px 0 0 var(--wp--preset--color--green);
}

.woocommerce-account .woocommerce form.login,
.woocommerce-account .woocommerce form.register,
.woocommerce-account .woocommerce form.lost_reset_password {
	margin: 0 !important;
	padding: var(--wp--preset--spacing--40) !important;
	border: 1px solid var(--wp--preset--color--line) !important;
	border-radius: var(--sm-radius-l) !important;
	background: var(--wp--preset--color--surface);
}

.woocommerce-account #customer_login {
	display: grid;
	gap: var(--wp--preset--spacing--40);
}

@media (min-width: 48rem) {
	.woocommerce-account #customer_login {
		grid-template-columns: 1fr 1fr;
	}
}

.woocommerce-account #customer_login::before,
.woocommerce-account #customer_login::after {
	display: none;
}

.woocommerce-account #customer_login > .u-column1,
.woocommerce-account #customer_login > .u-column2 {
	float: none;
	inline-size: auto;
}

.woocommerce form .form-row {
	padding: 0 !important;
	margin: 0 0 1rem !important;
}

.woocommerce form .form-row label {
	display: block;
	margin-bottom: 0.35rem;
	line-height: 1.4;
}

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

.woocommerce .woocommerce-form-login__rememberme {
	display: inline-flex !important;
	align-items: center;
	gap: 0.6rem;
	min-height: var(--sm-tap);
	font-weight: 400 !important;
}

.woocommerce .button,
.woocommerce button.button,
.woocommerce a.button,
.woocommerce input.button {
	min-height: var(--sm-btn-h);
	padding: 0.8rem 1.4rem !important;
	border: 2px solid var(--wp--preset--color--green) !important;
	border-radius: var(--sm-radius-m) !important;
	background: var(--wp--preset--color--green) !important;
	color: var(--wp--preset--color--on-green) !important;
	font-family: var(--wp--preset--font-family--display) !important;
	font-size: var(--wp--preset--font-size--small) !important;
	font-weight: 650 !important;
	line-height: 1.2 !important;
}

.woocommerce .button:hover {
	background: var(--wp--preset--color--green-deep) !important;
	border-color: var(--wp--preset--color--green-deep) !important;
}

.woocommerce .lost_password a {
	display: inline-flex;
	align-items: center;
	min-height: var(--sm-tap);
}

.woocommerce table.shop_table {
	border-color: var(--wp--preset--color--line) !important;
	border-radius: var(--sm-radius-m) !important;
	background: var(--wp--preset--color--surface);
}

.woocommerce table.shop_table th,
.woocommerce table.shop_table td {
	padding: 0.85rem 1rem !important;
	border-color: var(--wp--preset--color--line) !important;
}

/* Password visibility toggle: larger target */
.woocommerce .password-input .show-password-input {
	inline-size: 44px;
	block-size: 44px;
	top: 50% !important;
	transform: translateY(-50%);
}

/* Order confirmation */
.sm-confirmation > * + * {
	margin-top: var(--wp--preset--spacing--40);
}

.wc-block-order-confirmation-summary {
	padding: var(--wp--preset--spacing--40);
	border-radius: var(--sm-radius-l);
	background: var(--wp--preset--color--surface);
	border: 1px solid var(--wp--preset--color--line);
}

/* Imported descriptions carry inline fonts and colours from the old shop. Let the theme decide. */
.sm-prose [style],
.sm-product__excerpt [style],
.sm-qv__desc [style] {
	font-family: inherit !important;
	font-size: inherit !important;
	color: inherit !important;
	background-color: transparent !important;
	line-height: inherit !important;
}

.sm-prose ul {
	list-style: none;
	padding-inline-start: 0;
}

.sm-prose ul > li {
	position: relative;
	padding-inline-start: 1.5rem;
}

.sm-prose ul > li::before {
	content: "";
	position: absolute;
	left: 0.2rem;
	top: 0.6em;
	inline-size: 0.5rem;
	block-size: 0.5rem;
	background: var(--wp--preset--color--green);
}

.sm-product__gallery .wp-block-woocommerce-product-image-gallery {
	max-width: none !important;
}

/* Cart/checkout titles line up with the wide content below them. */
.sm-cart-page > .wp-block-post-title,
.sm-checkout-page > .wp-block-post-title {
	max-width: var(--wp--style--global--wide-size) !important;
}

.wc-block-components-quantity-selector {
	width: auto !important;
	min-width: 8.5rem;
	display: inline-flex !important;
}

.wc-block-components-quantity-selector input.wc-block-components-quantity-selector__input {
	min-width: 2.75rem;
}

/* Drawer close is an icon button, not a primary button. */
.wc-block-components-drawer__close.wc-block-components-button,
.wc-block-components-drawer__close {
	min-height: 48px !important;
	width: 48px !important;
	padding: 0 !important;
	border: 2px solid var(--wp--preset--color--line-strong) !important;
	background: var(--wp--preset--color--surface) !important;
	color: var(--wp--preset--color--ink) !important;
	top: 0.75rem !important;
	right: 0.75rem !important;
}

.wc-block-components-drawer__close svg {
	width: 28px !important;
	height: 28px !important;
	fill: currentColor;
}

.wc-block-mini-cart__title {
	padding-right: 4rem !important;
}

.wc-block-components-product-metadata,
.wc-block-components-product-metadata__description {
	font-size: var(--wp--preset--font-size--small) !important;
	color: var(--wp--preset--color--ink-soft);
}

.sm-qv__actions .sm-btn {
	flex: 1 1 12rem;
	min-height: var(--sm-btn-h);
	height: auto;
}

/* Layout stability: before the gallery slider starts, show only the first photo and
   reserve the thumbnail row, so nothing below jumps when it initialises. */
/* Gallery without slider: first photo large, the rest as a grid of tappable thumbnails (open the lightbox). */
.sm-product__gallery .woocommerce-product-gallery__wrapper {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 0.6rem;
	opacity: 1 !important;
}

.sm-product__gallery .woocommerce-product-gallery__image {
	width: auto !important;
	margin: 0 !important;
	float: none !important;
}

.sm-product__gallery .woocommerce-product-gallery__image:first-child {
	grid-column: 1 / -1;
}

.sm-product__gallery .woocommerce-product-gallery__image:not(:first-child) {
	border-radius: var(--sm-radius-m);
	aspect-ratio: 1;
}

.sm-product__gallery .woocommerce-product-gallery__image:not(:first-child) a {
	display: block;
	block-size: 100%;
	border-radius: var(--sm-radius-m);
}

.sm-product__gallery .woocommerce-product-gallery__image:not(:first-child) img {
	block-size: 100%;
	object-fit: contain;
}

.sm-product__gallery .woocommerce-product-gallery__image a:focus-visible {
	outline: var(--wp--custom--focus--width) solid var(--sm-focus);
	outline-offset: -3px;
}

/* Cart and checkout render in the browser; hold their space so the page below does not jump. */
.sm-cart-page .wp-block-woocommerce-cart,
.sm-checkout-page .wp-block-woocommerce-checkout {
	min-block-size: 100vh;
}

/* WooCommerce's gallery script sizes the wrapper for a slider even when the slider is off. Keep it in its column. */
.sm-product__gallery .woocommerce-product-gallery__wrapper {
	width: 100% !important;
	transform: none !important;
}

.sm-product__gallery .woocommerce-product-gallery__image a {
	display: block;
}

.sm-product__gallery .woocommerce-product-gallery__image img {
	display: block;
	width: 100% !important;
	height: auto !important;
}

/* ---------- Card: second photo on hover (pointer devices only) ---------- */
.sm-card__media .sm-card__alt {
	position: absolute;
	inset: 0;
	opacity: 0;
	background: var(--sm-board-light);
	transition: opacity var(--sm-slow) var(--sm-ease), transform var(--sm-slow) var(--sm-ease);
}

.sm-card__media .wc-block-components-product-image a {
	position: relative;
}

@media (hover: hover) and (pointer: fine) {
	.sm-card:hover .sm-card__alt {
		opacity: 1;
	}
}

@media (hover: none), (pointer: coarse) {
	.sm-card__media .sm-card__alt {
		display: none;
	}
}

/* ---------- Free shipping progress ---------- */
.sm-freeship {
	display: grid;
	gap: 0.6rem;
	margin-block: 0 var(--wp--preset--spacing--40);
	padding: 1rem 1.25rem;
	border: 1px solid var(--wp--preset--color--line);
	border-radius: var(--sm-radius-l);
	background: var(--wp--preset--color--surface);
}

.sm-freeship__text {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	margin: 0;
	font-weight: 600;
}

.sm-freeship__text .sm-icon {
	color: var(--wp--preset--color--green);
}

.sm-freeship__bar {
	block-size: 0.65rem;
	border-radius: 999px;
	background: var(--wp--preset--color--sunken);
	overflow: hidden;
}

.sm-freeship__bar span {
	display: block;
	block-size: 100%;
	inline-size: 0;
	border-radius: inherit;
	background: var(--wp--preset--color--green);
	transition: inline-size var(--sm-slow) var(--sm-ease), width var(--sm-slow) var(--sm-ease);
}

.sm-freeship.is-done {
	border-color: var(--wp--preset--color--green);
	background: var(--wp--preset--color--green-tint);
}


/* WooCommerce hides the gallery (inline opacity:0) until its script runs. Without the slider
   there is nothing to wait for, so show the photo immediately: it is the page's LCP element. */
.sm-product__gallery .woocommerce-product-gallery {
	opacity: 1 !important;
}

/* Hover photo replaces the main photo instead of blending with it:
   the main photo fades out, the second photo (opaque light square behind it) fades in. */
.sm-card__media .sm-card__alt {
	z-index: 1;
	box-sizing: border-box;
	inline-size: 100% !important;
	block-size: 100% !important;
	padding: 8%;
	object-fit: contain !important;
	background: var(--sm-board-light);
	mix-blend-mode: normal;
}

.sm-card__media .wc-block-components-product-image img:not(.sm-card__alt) {
	transition: opacity var(--sm-slow) var(--sm-ease), transform var(--sm-slow) var(--sm-ease);
}

@media (hover: hover) and (pointer: fine) {
	.sm-card:hover .sm-card__media:has(.sm-card__alt:not([data-src])) img:not(.sm-card__alt) {
		opacity: 0;
	}
}

/* ---------- Notices: the "Krepšelis" / "View cart" button is always readable ---------- */
.wc-block-components-notice-banner .wc-forward,
.wc-block-components-notice-banner a.button,
.woocommerce-message .button,
.woocommerce-message a.wc-forward {
	display: inline-flex !important;
	align-items: center;
	min-height: var(--sm-tap);
	padding: 0.4rem 1rem !important;
	border: 2px solid var(--wp--preset--color--ink) !important;
	border-radius: var(--sm-radius-m) !important;
	background: transparent !important;
	color: var(--wp--preset--color--ink) !important;
	font-family: var(--wp--preset--font-family--display) !important;
	font-weight: 700 !important;
	text-decoration: none !important;
	opacity: 1 !important;
	float: none !important;
}

.wc-block-components-notice-banner .wc-forward:hover,
.woocommerce-message .button:hover {
	background: var(--wp--preset--color--ink) !important;
	color: var(--wp--preset--color--paper) !important;
}

.wc-block-components-notice-banner {
	align-items: center !important;
	gap: 0.75rem !important;
	padding: 0.85rem 1rem !important;
}

.wc-block-components-notice-banner > svg {
	background: var(--wp--preset--color--green) !important;
	fill: var(--wp--preset--color--on-green) !important;
}

.wc-block-components-notice-banner__content {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.5rem 1rem;
	color: var(--wp--preset--color--ink);
}

/* ---------- Cart, checkout summary and mini-cart photos on a light plate ---------- */
.wc-block-cart-item__image a,
.wc-block-components-order-summary-item__image,
.wc-block-mini-cart__products-table .wc-block-cart-item__image a {
	display: block;
	border-radius: var(--sm-radius-m);
	background: var(--sm-board-light);
	isolation: isolate;
	overflow: hidden;
}

.wc-block-cart-item__image img,
.wc-block-components-order-summary-item__image img {
	display: block;
	box-sizing: border-box;
	inline-size: 100% !important;
	aspect-ratio: 1;
	object-fit: contain;
	padding: 6%;
	background: transparent !important;
	mix-blend-mode: multiply;
	border-radius: 0 !important;
}

.wc-block-components-order-summary-item__image {
	padding: 0 !important;
}

.wc-block-components-order-summary-item__quantity {
	z-index: 1;
	border-color: var(--wp--preset--color--surface) !important;
	background: var(--wp--preset--color--ink) !important;
	color: var(--wp--preset--color--paper) !important;
	box-shadow: none !important;
}

.wc-block-cart-items__row {
	padding-block: 1.25rem !important;
}

.wc-block-cart-item__quantity {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem 1rem;
}

.wc-block-cart-items__header {
	color: var(--wp--preset--color--ink-soft);
	font-size: var(--wp--preset--font-size--small) !important;
}

.wc-block-components-product-metadata__description {
	color: var(--wp--preset--color--ink-soft) !important;
}

/* ---------- Cart / checkout summary: breathing room inside the panel ---------- */
.wp-block-woocommerce-cart-order-summary-block,
.wp-block-woocommerce-checkout-order-summary-block {
	padding: 0.5rem 0 !important;
}

.wp-block-woocommerce-cart-order-summary-block .wc-block-components-totals-wrapper,
.wp-block-woocommerce-checkout-order-summary-block .wc-block-components-totals-wrapper,
.wp-block-woocommerce-cart-order-summary-block > .wc-block-cart__totals-title,
.wp-block-woocommerce-checkout-order-summary-block .wc-block-components-checkout-order-summary__title,
.wp-block-woocommerce-checkout-order-summary-block .wc-block-components-order-summary {
	padding-inline: 1.25rem !important;
}

.wc-block-cart__totals-title {
	display: block !important;
	margin: 0 !important;
	padding-block: 0.85rem !important;
	font-family: var(--wp--preset--font-family--display) !important;
	font-size: var(--wp--preset--font-size--medium) !important;
	font-weight: 700 !important;
	text-transform: none !important;
	letter-spacing: 0 !important;
	color: var(--wp--preset--color--ink) !important;
}

.wc-block-components-totals-wrapper {
	padding-block: 1rem !important;
}

.wc-block-components-totals-item {
	padding-block: 0.15rem;
}

.wc-block-components-totals-shipping .wc-block-components-radio-control__option {
	padding-block: 0.6rem !important;
}

.wc-block-components-totals-coupon .wc-block-components-panel__button {
	padding-block: 0.4rem !important;
	font-weight: 600;
}

.wc-block-cart__submit-container {
	padding-inline: 0 !important;
	margin-top: 1rem;
}

/* Out-rank WooCommerce's own notice-button rule (it also uses !important). */
.wc-block-components-notice-banner[class] > .wc-block-components-notice-banner__content a.wc-forward {
	padding: 0.4rem 1rem !important;
	border: 2px solid var(--wp--preset--color--ink) !important;
	border-radius: var(--sm-radius-m) !important;
	background: transparent !important;
	color: var(--wp--preset--color--ink) !important;
	text-decoration: none !important;
	opacity: 1 !important;
}

.wc-block-components-notice-banner[class] > .wc-block-components-notice-banner__content a.wc-forward:hover,
.wc-block-components-notice-banner[class] > .wc-block-components-notice-banner__content a.wc-forward:focus-visible {
	background: var(--wp--preset--color--ink) !important;
	color: var(--wp--preset--color--paper) !important;
}

/* Empty total sections (no fees, no discounts) take no space. */
.wc-block-components-totals-wrapper:not(:has(.wc-block-components-totals-item, .wc-block-components-panel, .wc-block-components-totals-coupon, .wc-block-components-totals-shipping, .wc-block-components-totals-footer-item, .wc-block-components-order-summary, input, button)) {
	display: none !important;
}

/* =====================================================================
   Checkout: shipping and payment options as one clean, bordered list
   ===================================================================== */
.wc-block-components-radio-control--highlight-checked,
.wc-block-checkout__payment-method .wc-block-components-radio-control {
	border: 1.5px solid var(--wp--preset--color--line-strong) !important;
	border-radius: var(--sm-radius-l) !important;
	overflow: hidden;
	box-shadow: none !important;
}

.wc-block-components-radio-control--highlight-checked::after,
.wc-block-components-radio-control--highlight-checked .wc-block-components-radio-control__option::after,
.wc-block-components-radio-control--highlight-checked .wc-block-components-radio-control-accordion-option::after,
.wc-block-components-radio-control--highlight-checked .wc-block-components-radio-control__option--checked-option-highlighted::after,
.wc-block-components-radio-control--highlight-checked div.wc-block-components-radio-control-accordion-option--checked-option-highlighted::after {
	display: none !important;
	content: none !important;
}

.wc-block-components-radio-control--highlight-checked label.wc-block-components-radio-control__option--checked-option-highlighted,
.wc-block-components-radio-control--highlight-checked div.wc-block-components-radio-control-accordion-option--checked-option-highlighted {
	box-shadow: none !important;
	border-radius: 0 !important;
	background: var(--wp--preset--color--green-tint) !important;
}

.wc-block-components-radio-control--highlight-checked .wc-block-components-radio-control__option,
.wc-block-components-radio-control--highlight-checked .wc-block-components-radio-control-accordion-option {
	margin: 0 !important;
	border-radius: 0 !important;
	box-shadow: none !important;
}

.wc-block-components-radio-control--highlight-checked > * + * {
	border-top: 1px solid var(--wp--preset--color--line) !important;
}


.wc-block-components-radio-control-accordion-content {
	padding-bottom: 1rem !important;
}

/* Montonio bank country select: readable in both modes */
.montonio-bank-select-class,
.montonio-target-container select {
	inline-size: 100%;
	min-height: var(--sm-btn-h) !important;
	padding: 0.6rem 0.9rem !important;
	border: 2px solid var(--wp--preset--color--line-strong) !important;
	border-radius: var(--sm-radius-m) !important;
	background-color: var(--wp--preset--color--surface) !important;
	color: var(--wp--preset--color--ink) !important;
	font: inherit !important;
	font-size: var(--wp--preset--font-size--medium) !important;
	color-scheme: light dark;
}

.montonio-bank-select-class option {
	background: var(--wp--preset--color--surface);
	color: var(--wp--preset--color--ink);
}

/* =====================================================================
   Notices (info / error / warning) in theme colours, light and dark
   ===================================================================== */
.wc-block-components-notice-banner[class] {
	border: 1px solid var(--wp--preset--color--line-strong) !important;
	border-radius: var(--sm-radius-m) !important;
	background: var(--wp--preset--color--surface) !important;
	color: var(--wp--preset--color--ink) !important;
}

.wc-block-components-notice-banner[class].is-info > svg {
	background: var(--wp--preset--color--ink-soft) !important;
	fill: var(--wp--preset--color--surface) !important;
}

.wc-block-components-notice-banner[class].is-success {
	border-color: var(--wp--preset--color--green) !important;
	background: var(--wp--preset--color--green-tint) !important;
}

.wc-block-components-notice-banner[class].is-error {
	border-color: var(--wp--preset--color--alert) !important;
}

.wc-block-components-notice-banner[class].is-error > svg {
	background: var(--wp--preset--color--alert) !important;
	fill: var(--wp--preset--color--surface) !important;
}

.wc-block-components-notice-banner[class] > .wc-block-components-notice-banner__content {
	color: var(--wp--preset--color--ink) !important;
}

/* =====================================================================
   My account
   ===================================================================== */
.woocommerce-account .woocommerce-notices-wrapper:empty {
	display: none;
}

.woocommerce-account .woocommerce h2 {
	margin-top: 0 !important;
}

.woocommerce-account .sm-page > .wp-block-post-title {
	margin-bottom: var(--wp--preset--spacing--30);
}

/* Navigation: a tidy vertical menu, no prose bullets, even spacing */
.woocommerce-MyAccount-navigation ul {
	gap: 0.25rem !important;
	padding: 0.5rem !important;
	border: 1px solid var(--wp--preset--color--line);
	border-radius: var(--sm-radius-l);
	background: var(--wp--preset--color--surface);
}

.woocommerce-MyAccount-navigation ul > li {
	margin: 0 !important;
	padding: 0 !important;
}

.woocommerce-MyAccount-navigation ul > li::before {
	content: none !important;
	display: none !important;
}

.woocommerce-MyAccount-navigation a {
	text-decoration: none !important;
}

.woocommerce-MyAccount-navigation .is-active a {
	text-decoration: none !important;
}

.woocommerce-MyAccount-navigation-link--customer-logout {
	margin-top: 0.25rem !important;
	padding-top: 0.25rem !important;
	border-top: 1px solid var(--wp--preset--color--line);
}

.woocommerce-MyAccount-navigation-link--customer-logout a {
	color: var(--wp--preset--color--ink-soft) !important;
}

.woocommerce-MyAccount-content > :first-child {
	margin-top: 0;
}

.woocommerce-MyAccount-content p {
	margin-block: 0 1rem;
}

.woocommerce-MyAccount-content .woocommerce-Addresses {
	display: grid;
	gap: var(--wp--preset--spacing--40);
}

@media (min-width: 48rem) {
	.woocommerce-MyAccount-content .woocommerce-Addresses {
		grid-template-columns: 1fr 1fr;
	}
}

.woocommerce-MyAccount-content .woocommerce-Address,
.woocommerce-MyAccount-content .woocommerce-Addresses .u-column1,
.woocommerce-MyAccount-content .woocommerce-Addresses .u-column2 {
	float: none !important;
	inline-size: auto !important;
	padding: var(--wp--preset--spacing--40);
	border: 1px solid var(--wp--preset--color--line);
	border-radius: var(--sm-radius-l);
	background: var(--wp--preset--color--surface);
}

.woocommerce-MyAccount-content .woocommerce-Addresses::before,
.woocommerce-MyAccount-content .woocommerce-Addresses::after {
	display: none !important;
}

.woocommerce-MyAccount-content .woocommerce-Address-title {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: 0.5rem;
}

.woocommerce-MyAccount-content .woocommerce-Address-title h2 {
	margin: 0 0 0.5rem !important;
	font-size: var(--wp--preset--font-size--large);
}

.woocommerce-MyAccount-content address {
	font-style: normal;
	line-height: 1.6;
}

.woocommerce-MyAccount-content form .woocommerce-address-fields__field-wrapper,
.woocommerce-MyAccount-content .woocommerce-EditAccountForm {
	max-inline-size: 40rem;
}

.woocommerce-MyAccount-content fieldset {
	margin: var(--wp--preset--spacing--40) 0;
	padding: var(--wp--preset--spacing--40);
	border: 1px solid var(--wp--preset--color--line);
	border-radius: var(--sm-radius-l);
}

.woocommerce-MyAccount-content fieldset legend {
	padding-inline: 0.4rem;
	font-family: var(--wp--preset--font-family--display);
	font-weight: 700;
}

.woocommerce-MyAccount-content .woocommerce-orders-table,
.woocommerce-MyAccount-content table.shop_table {
	inline-size: 100%;
	border-collapse: separate !important;
	border-spacing: 0;
	overflow: hidden;
	color: var(--wp--preset--color--ink);
}

.woocommerce-MyAccount-content .woocommerce-orders-table th {
	color: var(--wp--preset--color--ink-soft);
	font-size: var(--wp--preset--font-size--small);
	text-align: start;
}

.woocommerce-MyAccount-content .woocommerce-orders-table .button {
	min-height: var(--sm-tap) !important;
	padding: 0.4rem 0.9rem !important;
	margin: 0.15rem !important;
}

.woocommerce-account .woocommerce-form-row span em,
.woocommerce-account #account_display_name_description em {
	color: var(--wp--preset--color--ink-soft);
	font-size: var(--wp--preset--font-size--small);
}

.woocommerce-account .woocommerce-Button,
.woocommerce-account button[type="submit"] {
	margin-top: 0.5rem;
}

/* Order summary photo: a fixed square, never stretched by the text next to it. */
.wc-block-components-order-summary-item__image {
	flex: none !important;
	align-self: flex-start;
	inline-size: 56px !important;
	block-size: 56px !important;
}

.wc-block-components-order-summary-item__image img {
	inline-size: 56px !important;
	block-size: 56px !important;
	max-inline-size: none !important;
}

.woocommerce-MyAccount-content .woocommerce-Address-title {
	display: block !important;
	text-align: start;
}

.woocommerce-MyAccount-content .woocommerce-Address-title h2 {
	float: none !important;
	text-align: start !important;
}

.woocommerce-MyAccount-content .woocommerce-Address-title .edit {
	float: none !important;
	display: inline-flex;
	align-items: center;
	min-height: var(--sm-tap);
}

/* Gallery photos and thumbnails sit on their own light plate (never blend into a dark page). */
.sm-product__gallery .woocommerce-product-gallery__image {
	isolation: isolate;
	background: var(--sm-board-light) !important;
	overflow: hidden;
}

.sm-product__gallery .woocommerce-product-gallery__image:first-child img {
	box-sizing: border-box;
	aspect-ratio: 1;
	object-fit: contain;
	padding: 6%;
}

.sm-product__gallery .woocommerce-product-gallery__image:not(:first-child) {
	border: 2px solid transparent;
	cursor: pointer;
	transition: border-color var(--sm-fast) var(--sm-ease), transform var(--sm-fast) var(--sm-ease);
}

.sm-product__gallery .woocommerce-product-gallery__image:not(:first-child) img {
	box-sizing: border-box;
	padding: 8%;
}

.sm-product__gallery .woocommerce-product-gallery__image:not(:first-child):hover {
	border-color: var(--wp--preset--color--line-strong);
}

.sm-product__gallery .woocommerce-product-gallery__image.is-active {
	border-color: var(--wp--preset--color--green) !important;
}

/* No hover zoom: hide anything the zoom script may have left behind. */
.sm-product__gallery .zoomImg {
	display: none !important;
}

/* Mini-cart title: one line of text that wraps naturally, clear of the close button. */
.wc-block-mini-cart__title {
	display: block !important;
	margin: 0 !important;
	padding: 1.25rem 4.5rem 0.75rem 1.25rem !important;
	font-size: var(--wp--preset--font-size--x-large) !important;
	line-height: 1.15 !important;
	mask-image: none !important;
}

.wc-block-mini-cart__title > span,
.wc-block-mini-cart__title .wp-block-woocommerce-mini-cart-title-label-block,
.wc-block-mini-cart__title .wp-block-woocommerce-mini-cart-title-items-counter-block {
	display: inline !important;
	margin: 0 !important;
}

.wc-block-mini-cart__title .wp-block-woocommerce-mini-cart-title-items-counter-block {
	color: var(--wp--preset--color--ink-soft);
	font-weight: 600;
}

/* =====================================================================
   Checkout rhythm: one gap between all steps, compact summary rows
   ===================================================================== */
.wc-block-checkout__form,
.wp-block-woocommerce-checkout-fields-block {
	--sm-co-gap: var(--wp--preset--spacing--50);
}

.wc-block-checkout__terms {
	padding-top: 0 !important;
	margin-top: 0 !important;
	border-top: 0 !important;
}

.wc-block-checkout__order-notes,
.wc-block-checkout__add-note {
	margin-block: 0 !important;
}

.wc-block-checkout__actions {
	margin-top: 0 !important;
	padding-top: 0 !important;
}

.wc-block-checkout__actions_row {
	align-items: center;
}

/* Summary: equal, compact spacing between rows and sections */
.wp-block-woocommerce-checkout-order-summary-block .wc-block-components-totals-wrapper,
.wp-block-woocommerce-cart-order-summary-block .wc-block-components-totals-wrapper {
	padding-block: 0.75rem !important;
}

.wc-block-components-totals-wrapper .wc-block-components-totals-item {
	margin: 0 !important;
	padding-block: 0.2rem !important;
}

.wc-block-components-totals-wrapper .wc-block-components-totals-item + .wc-block-components-totals-item {
	margin-top: 0.4rem !important;
}

.wc-block-components-checkout-order-summary__title {
	padding-block: 0.9rem !important;
}

.wc-block-components-order-summary .wc-block-components-order-summary-item {
	padding-block: 0.5rem !important;
}

.wc-block-components-totals-footer-item {
	padding-block: 0.5rem 0 !important;
}

.wc-block-components-totals-coupon .wc-block-components-panel__button {
	margin: 0 !important;
}

.wc-block-checkout__terms {
	margin-top: calc(var(--wp--preset--spacing--50) + 3px) !important;
}

/* =====================================================================
   Order summary (cart + checkout, desktop sidebar + phone copies): one inset
   for every row. WooCommerce nests three paddings (wrapper, summary, item);
   only the outer wrapper keeps one.
   ===================================================================== */
:is(.wp-block-woocommerce-checkout-order-summary-block, .wp-block-woocommerce-cart-order-summary-block) {
	--sm-sum-x: 1rem;
	padding: 0 !important;
}

@media (min-width: 48rem) {
	:is(.wp-block-woocommerce-checkout-order-summary-block, .wp-block-woocommerce-cart-order-summary-block) {
		--sm-sum-x: 1.25rem;
	}
}

:is(.wp-block-woocommerce-checkout-order-summary-block, .wp-block-woocommerce-cart-order-summary-block) .wc-block-components-totals-wrapper {
	padding: 0.7rem var(--sm-sum-x) !important;
}

:is(.wp-block-woocommerce-checkout-order-summary-block, .wp-block-woocommerce-cart-order-summary-block) :is(.wc-block-components-order-summary, .wc-block-components-totals-item, .wc-block-components-totals-coupon, .wc-block-components-totals-shipping) {
	padding-inline: 0 !important;
}

:is(.wp-block-woocommerce-checkout-order-summary-block, .wp-block-woocommerce-cart-order-summary-block) .wp-block-woocommerce-checkout-order-summary-totals-block {
	padding: 0 !important;
}

/* Titles: the collapsible one (phone, top), the plain heading (phone, above "place order") and the cart's. */
.wp-block-woocommerce-checkout-order-summary-block .wc-block-components-checkout-order-summary__title,
.wp-block-woocommerce-checkout-order-summary-block > .wc-block-components-checkout-step__heading,
.wp-block-woocommerce-cart-order-summary-block > .wc-block-cart__totals-title {
	margin: 0 !important;
	padding: 0.9rem var(--sm-sum-x) 0.4rem !important;
}

.wp-block-woocommerce-checkout-order-summary-block > .wc-block-components-checkout-step__heading .wc-block-components-title {
	margin: 0 !important;
	font-size: var(--wp--preset--font-size--medium) !important;
}

.wp-block-woocommerce-checkout-order-summary-block .wc-block-components-checkout-order-summary__title[aria-expanded="true"],
.wp-block-woocommerce-checkout-order-summary-block .wc-block-components-checkout-order-summary__title:not([aria-expanded]) {
	padding-bottom: 0.4rem !important;
}

.wp-block-woocommerce-checkout-order-summary-block .wc-block-components-checkout-order-summary__title[aria-expanded="false"] {
	padding-bottom: 0.9rem !important;
}

/* Line items: photo, name and price; the product's description stays on the product page. */
.wc-block-components-order-summary .wc-block-components-order-summary-item {
	gap: 0.85rem;
	padding-block: 0.4rem !important;
}

.wc-block-components-order-summary .wc-block-components-product-metadata {
	display: none !important;
}

.wc-block-components-order-summary-item__description {
	padding-inline: 0 !important;
}

.wc-block-components-order-summary-item__description .wc-block-components-product-name {
	margin: 0 !important;
	font-family: var(--wp--preset--font-family--body) !important;
	font-size: var(--wp--preset--font-size--medium) !important;
	font-weight: 600 !important;
	line-height: 1.3 !important;
}

.wc-block-components-checkout-order-summary__title-text {
	margin: 0 !important;
}

.wc-block-components-order-summary-item__individual-prices {
	margin-top: 0.2rem !important;
	padding-top: 0 !important;
	color: var(--wp--preset--color--ink-soft) !important;
	font-size: var(--wp--preset--font-size--small) !important;
}

.wc-block-components-order-summary-item__total-price {
	padding-inline-start: 0.5rem;
	white-space: nowrap;
}

/* Coupon toggle: full row, arrow on the right edge of the inset. */
.wc-block-components-totals-coupon .wc-block-components-panel__button {
	padding-inline: 0 2rem !important;
}

.wc-block-components-totals-coupon .wc-block-components-panel__button-icon {
	right: 0 !important;
}

.wc-block-components-totals-footer-item {
	padding-block: 0.25rem 0 !important;
}

/* Phone: the summary copy inside the form sits below the divider WooCommerce draws 35px under the
   order note, with the line midway between the two (as between the steps above). */
.wc-block-checkout__form .wp-block-woocommerce-checkout-order-summary-block {
	margin-top: 70px !important;
}

/* WooCommerce adds a second, faint frame inside the phone summary copy; the card's own border is enough. */
.wp-block-woocommerce-checkout-order-summary-block .checkout-order-summary-block-fill {
	border: 0 !important;
	border-radius: 0 !important;
}
