/**
 * Craftvyn WooCommerce styles. Loaded on store pages only.
 */

.woocommerce-message,
.woocommerce-info,
.woocommerce-error,
.wc-block-components-notice-banner {
	border-radius: var(--wp--custom--radius--medium);
	font-size: var(--wp--preset--font-size--small);
}

.woocommerce-message,
.woocommerce-info {
	background-color: var(--wp--preset--color--surface);
	border-left: 4px solid var(--wp--preset--color--secondary);
	color: var(--wp--preset--color--contrast);
	list-style: none;
	padding: 1em 1.25em;
}

.woocommerce-error {
	background-color: var(--wp--preset--color--surface);
	border-left: 4px solid #b91c1c;
	color: var(--wp--preset--color--contrast);
	list-style: none;
	padding: 1em 1.25em;
}

.woocommerce-message a,
.woocommerce-info a,
.woocommerce-error a {
	font-weight: 600;
}

/* Product price. */
.wc-block-components-product-price,
.price {
	color: var(--wp--preset--color--contrast);
	font-weight: 700;
}

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

.price ins,
.wc-block-components-product-price ins {
	text-decoration: none;
}

/* Product cards in collections. */
.wc-block-product-template .wc-block-product {
	border-radius: var(--wp--custom--radius--large);
}

.wc-block-components-product-image img {
	border-radius: var(--wp--custom--radius--medium);
}

.wc-block-components-product-sale-badge {
	background-color: var(--wp--preset--color--accent);
	border: 0;
	border-radius: var(--wp--custom--radius--pill);
	color: var(--wp--preset--color--contrast);
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 700;
	padding: 0.35em 0.9em;
}

/* Buttons rendered by WooCommerce without core button classes. */
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #respond input#submit,
.wc-block-components-button:not(.is-link) {
	background-color: var(--wp--preset--color--primary);
	border: 0;
	border-radius: var(--wp--custom--radius--medium);
	color: var(--wp--preset--color--base);
	font-family: inherit;
	font-weight: 600;
	padding: 0.9em 1.6em;
	text-decoration: none;
}

.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover,
.woocommerce #respond input#submit:hover,
.wc-block-components-button:not(.is-link):hover {
	background-color: var(--wp--preset--color--primary-dark);
	color: var(--wp--preset--color--base);
}

.woocommerce-breadcrumb,
.wc-block-breadcrumbs {
	color: var(--wp--preset--color--muted);
	font-size: var(--wp--preset--font-size--small);
}

.woocommerce-breadcrumb a,
.wc-block-breadcrumbs a {
	color: var(--wp--preset--color--muted);
}

/* Tables and navigation in the account area and product details. */
.woocommerce table.shop_table {
	border: 1px solid var(--wp--preset--color--border);
	border-collapse: separate;
	border-radius: var(--wp--custom--radius--medium);
	border-spacing: 0;
	width: 100%;
}

.woocommerce table.shop_table th,
.woocommerce table.shop_table td {
	border-bottom: 1px solid var(--wp--preset--color--border);
	padding: 0.85em 1em;
	text-align: left;
}

.woocommerce-MyAccount-navigation ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.woocommerce-MyAccount-navigation a {
	display: block;
	padding: 0.5em 0;
	text-decoration: none;
}

.woocommerce-MyAccount-navigation .is-active a {
	color: var(--wp--preset--color--contrast);
	font-weight: 700;
}

/* Star ratings are decorative; the numeric rating is also exposed to assistive tech by WooCommerce. */
.wc-block-components-product-rating__stars,
.star-rating {
	color: var(--wp--preset--color--accent);
}
