/*
 * WooCommerce styling on top of WooCommerce's own stylesheets.
 *
 * Baseline only: shop, product, cart and checkout pages get the Novus DNA
 * typography, colours and buttons. Their full Shopify layouts are a later milestone.
 */

.woocommerce-container {
	--container-width: 87.5rem;
}

/* Buttons */
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #respond input#submit,
.woocommerce a.button.alt,
.woocommerce button.button.alt,
.woocommerce input.button.alt,
.wc-block-components-button:not(.is-link),
.wp-block-button__link.add_to_cart_button {
	padding: var(--font-button-padding-block) var(--font-button-padding-inline);
	border: var(--border-thickness) solid rgb(var(--color-primary-button-border));
	border-radius: var(--border-radius-button);
	background-color: rgb(var(--color-primary-button));
	color: rgb(var(--color-primary-button-label));
	font-family: var(--font-heading-family);
	font-weight: var(--font-heading-weight);
	font-size: var(--font-button-size);
	line-height: 1.25;
	letter-spacing: var(--font-button-letter-spacing);
	transition: background-color 0.3s ease, border-color 0.3s ease;
}

.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover,
.woocommerce #respond input#submit:hover,
.woocommerce a.button.alt:hover,
.woocommerce button.button.alt:hover,
.woocommerce input.button.alt:hover,
.wc-block-components-button:not(.is-link):hover {
	background-color: rgb(var(--color-primary-button-hover));
	border-color: rgb(var(--color-primary-button-hover));
	color: rgb(var(--color-primary-button-label));
}

.woocommerce button.button:disabled,
.woocommerce button.button.disabled,
.woocommerce a.button.disabled {
	opacity: 0.5;
	padding: var(--font-button-padding-block) var(--font-button-padding-inline);
}

/* Prices */
.woocommerce .price,
.woocommerce div.product p.price,
.woocommerce div.product span.price,
.woocommerce ul.products li.product .price {
	color: rgb(var(--color-foreground));
	font-weight: var(--font-body-weight);
}

.woocommerce .price del {
	color: rgb(var(--color-text-secondary));
	opacity: 1;
}

.woocommerce .price ins {
	text-decoration: none;
}

/* Product grid: matches the homepage card */
.woocommerce ul.products {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: var(--gap-vertical) var(--gap-horizontal);
	margin: 0;
}

.woocommerce ul.products::before,
.woocommerce ul.products::after {
	display: none;
}

.woocommerce ul.products li.product,
.woocommerce-page ul.products li.product,
.woocommerce ul.products[class*="columns-"] li.product,
.woocommerce-page ul.products[class*="columns-"] li.product {
	float: none;
	inline-size: auto;
	margin: 0;
}

@media (min-width: 64em) {
	.woocommerce ul.products.columns-4 {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}

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

.woocommerce ul.products li.product a img {
	margin-block-end: var(--space-s);
	border-radius: var(--border-radius-card);
}

.woocommerce ul.products li.product .woocommerce-loop-product__title {
	padding: 0;
	font-family: var(--font-heading-family);
	font-weight: var(--font-heading-weight);
	font-size: var(--font-heading-h6-size);
}

.woocommerce span.onsale {
	min-block-size: 0;
	min-inline-size: 0;
	padding: var(--space-3xs) var(--space-2xs);
	border-radius: var(--border-radius-button);
	background-color: rgb(var(--color-exception));
	color: rgb(var(--color-primary-button-label));
	font-family: var(--font-heading-family);
	font-size: var(--font-xs-size);
	font-weight: var(--font-heading-weight);
	line-height: 1.25;
}

/* Single product */
.woocommerce div.product .product_title {
	font-size: var(--font-heading-h2-size);
}

.woocommerce div.product div.images img {
	border-radius: var(--border-radius-card);
}

.woocommerce div.product .woocommerce-tabs ul.tabs li {
	border-radius: 0;
	background: transparent;
}

/* Notices */
.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
	border-block-start-color: rgb(var(--color-primary-button));
	background-color: #fff;
	color: rgb(var(--color-foreground));
}

.woocommerce-message::before,
.woocommerce-info::before {
	color: rgb(var(--color-primary-button));
}

/* Info and error notices with a button ("Confirm email address", "Browse products"): the
 * text first, then the button, side by side when they fit and stacked when not.
 * WooCommerce floats the button, which squeezed the text into a sliver beside it. */
.woocommerce .woocommerce-info:has(> .button),
.woocommerce .woocommerce-error:has(> .button) {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem 1rem;
}

.woocommerce .woocommerce-info:has(> .button)::after,
.woocommerce .woocommerce-error:has(> .button)::after {
	content: none;
}

.woocommerce .woocommerce-info > .button,
.woocommerce .woocommerce-error > .button {
	order: 2;
	float: none;
	margin: 0;
}

/*
 * Success notice ("… has been added to your basket"): a quiet brand card in place of
 * WooCommerce's alert bar. WooCommerce focuses the notice so screen readers announce
 * it (role="alert"); the ring is shown only for keyboard focus.
 */
.woocommerce-notices-wrapper .woocommerce-message,
.woocommerce .woocommerce-message {
	display: grid;
	grid-template-columns: 1.25rem minmax(0, 1fr) auto;
	align-items: center;
	gap: 0.5rem 0.75rem;
	margin: 0 0 1rem;
	padding: 0.75rem 0.75rem 0.75rem 1rem;
	border: 1px solid rgba(43, 37, 94, 0.12);
	border-radius: 0.75rem;
	background: linear-gradient(180deg, #fbfaff 0%, #f5f3fa 100%);
	box-shadow: 0 1px 2px rgba(27, 23, 64, 0.04);
	color: #1b1740;
	font-family: "Inter", ui-sans-serif, system-ui, sans-serif;
	font-size: 0.9375rem;
	font-weight: 400;
	line-height: 1.45;
}

.woocommerce-notices-wrapper .woocommerce-message::before,
.woocommerce .woocommerce-message::before {
	position: static;
	width: 1.25rem;
	height: 1.25rem;
	margin: 0;
	border-radius: 50%;
	background: #4e2583 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5.75 10.25l2.75 2.75 5.75-6' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 0.875rem no-repeat;
	content: "";
}

.woocommerce-notices-wrapper .woocommerce-message::after,
.woocommerce .woocommerce-message::after {
	content: none;
}

.woocommerce-notices-wrapper .woocommerce-message:focus,
.woocommerce .woocommerce-message:focus {
	outline: none;
}

.woocommerce-notices-wrapper .woocommerce-message:focus-visible,
.woocommerce .woocommerce-message:focus-visible {
	box-shadow: 0 0 0 3px rgba(78, 37, 131, 0.12);
}

.woocommerce-notices-wrapper .woocommerce-message a.button.wc-forward,
.woocommerce .woocommerce-message a.button.wc-forward {
	grid-column: 3;
	grid-row: 1;
	float: none;
	margin: 0;
	padding: 0.5rem 1rem;
	border: 1px solid #2b255e;
	border-radius: 999px;
	background: #2b255e;
	box-shadow: none;
	color: #fff;
	font-family: "Plus Jakarta Sans", ui-sans-serif, system-ui, sans-serif;
	font-size: 0.8125rem;
	font-weight: 600;
	letter-spacing: 0.01em;
	line-height: 1.2;
	text-decoration: none;
	white-space: nowrap;
	transition: background-color 0.15s ease, border-color 0.15s ease;
}

.woocommerce-notices-wrapper .woocommerce-message a.button.wc-forward:hover,
.woocommerce .woocommerce-message a.button.wc-forward:hover {
	border-color: #1b1740;
	background: #1b1740;
	color: #fff;
}

.woocommerce-notices-wrapper .woocommerce-message a.button.wc-forward:focus-visible,
.woocommerce .woocommerce-message a.button.wc-forward:focus-visible {
	outline: 2px solid #4e2583;
	outline-offset: 2px;
}

@media (max-width: 47.99em) {
	.woocommerce-notices-wrapper .woocommerce-message,
	.woocommerce .woocommerce-message {
		grid-template-columns: 1.25rem minmax(0, 1fr);
		align-items: start;
		padding: 0.75rem;
		font-size: 0.875rem;
	}

	/* The button sits under the message, lined up with the text. */
	.woocommerce-notices-wrapper .woocommerce-message a.button.wc-forward,
	.woocommerce .woocommerce-message a.button.wc-forward {
		grid-column: 2;
		grid-row: 2;
		justify-self: start;
	}
}

/* Forms: underline inputs (Shopify input_style "underline") */
.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea,
.woocommerce form .form-row select,
.woocommerce .quantity .qty {
	padding: var(--space-xs) 0;
	border: 0;
	border-block-end: var(--border);
	border-radius: 0;
	background: transparent;
	color: inherit;
	font-family: var(--font-body-family);
}

.woocommerce .quantity .qty {
	padding-inline: var(--space-2xs);
}

/* Cart and checkout blocks */
.wc-block-cart,
.wc-block-checkout {
	font-family: var(--font-body-family);
}

.wc-block-components-title,
.wc-block-cart__totals-title {
	font-family: var(--font-heading-family) !important;
	font-weight: var(--font-heading-weight) !important;
}

.wc-block-components-text-input input,
.wc-block-components-combobox .wc-block-components-combobox-control input {
	border-radius: 0.25rem;
}

/* Breadcrumb and result count */
.woocommerce .woocommerce-breadcrumb,
.woocommerce .woocommerce-result-count {
	color: rgb(var(--color-text-secondary));
	font-size: var(--font-xs-size);
}

.woocommerce .woocommerce-ordering select {
	padding: var(--space-2xs) var(--space-xs);
	border: var(--border);
	border-radius: var(--border-radius-button);
	background: transparent;
	font-family: var(--font-body-family);
}

/* Reviewer initial (in place of a Gravatar image) */
.nv-review-initial {
	float: left;
	display: grid;
	place-items: center;
	inline-size: 2.5rem;
	block-size: 2.5rem;
	border-radius: 50%;
	background: #ece9f6;
	color: #2b255e;
	font-family: var(--font-heading-family);
	font-weight: 600;
}

/* Review names and dates: WooCommerce's grey is below AA on tinted backgrounds. */
.woocommerce #reviews #comments ol.commentlist li .comment-text p.meta,
.woocommerce-review__author,
.woocommerce-review__published-date {
	color: #4f4b60;
}
