/**
 * Steveston Heritage — WooCommerce layer.
 * Loaded only when WooCommerce is active (see functions.php), after
 * WooCommerce's own stylesheets. Covers both the block-based store
 * (product collection, cart & checkout blocks) and classic shortcodes.
 *
 * Most WooCommerce blocks already inherit theme.json (fonts, colours,
 * buttons). This file fixes what doesn't: faded secondary text, sale
 * badges, notices, form fields and a few link/price details.
 */

/* ------------------------------------------------------------------ */
/* Prices & sale badges                                                */
/* ------------------------------------------------------------------ */

.woocommerce-Price-amount,
.wc-block-components-product-price,
.wc-block-components-formatted-money-amount {
	color: var(--shs-heading, #333);
}

.wc-block-components-product-price del,
.woocommerce del .woocommerce-Price-amount,
.price del {
	color: var(--shs-text, #6e6e6e);
	opacity: 1;
}

.wc-block-components-product-price ins,
.price ins {
	text-decoration: none;
	font-weight: 700;
}

.woocommerce span.onsale,
.wc-block-components-product-sale-badge,
.wp-block-woocommerce-product-sale-badge .wc-block-components-product-sale-badge {
	background: var(--shs-orange, #c25310);
	color: #fff;
	border: 0;
	border-radius: var(--shs-radius, 3px);
	font-family: lato, Helvetica, Tahoma, Geneva, Arial, sans-serif;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.02em;
	min-height: 0;
	min-width: 0;
	line-height: 1.5;
	padding: 0.15rem 0.6rem;
}

/* ------------------------------------------------------------------ */
/* Product names & links                                               */
/* ------------------------------------------------------------------ */

.wc-block-components-product-name,
.wp-block-woocommerce-product-collection .wp-block-post-title a,
.woocommerce ul.products li.product .woocommerce-loop-product__title {
	color: var(--shs-teal, #4a7482);
	font-family: lato, Helvetica, Tahoma, Geneva, Arial, sans-serif;
	font-weight: 700;
	text-decoration: none;
}

.wc-block-components-product-name:hover,
.wp-block-woocommerce-product-collection .wp-block-post-title a:hover {
	color: var(--shs-teal-darker, #2e4a53);
	text-decoration: underline;
}

.woocommerce-breadcrumb,
.wc-block-breadcrumbs {
	color: var(--shs-text, #6e6e6e);
}

/* ------------------------------------------------------------------ */
/* Buttons (classic + blocks)                                          */
/* ------------------------------------------------------------------ */

.woocommerce :is(a.button, button.button, input.button, #respond input#submit),
.wc-block-components-button:not(.is-link),
.wc-block-cart__submit-button,
.wc-block-components-checkout-place-order-button {
	background: var(--shs-teal-dark, #3b5d68);
	color: #fff;
	border: 2px solid transparent;
	border-radius: 3px;
	font-family: lato, Helvetica, Tahoma, Geneva, Arial, sans-serif;
	font-weight: 700;
}

.woocommerce :is(a.button, button.button, input.button):hover,
.wc-block-components-button:not(.is-link):hover,
.wc-block-cart__submit-button:hover,
.wc-block-components-checkout-place-order-button:hover {
	background: var(--shs-teal-darker, #2e4a53);
	color: #fff;
}

.woocommerce :is(a.button, button.button, input.button).alt {
	background: var(--shs-orange, #c25310);
	color: #fff;
}

.woocommerce :is(a.button, button.button, input.button).alt:hover {
	background: var(--shs-orange-dark, #924a19);
}

.wc-block-components-button.is-link {
	color: var(--shs-teal, #4a7482);
	text-decoration: underline;
}

/* ------------------------------------------------------------------ */
/* Readable secondary text (WooCommerce fades these with opacity)      */
/* ------------------------------------------------------------------ */

.wc-block-components-product-metadata,
.wc-block-components-product-details,
.wc-block-components-totals-item__description,
.wc-block-components-checkout-step__description,
.wc-block-components-address-card,
.wc-block-components-order-summary-item__description,
.wc-block-components-shipping-rates-control__package-subtitle,
.woocommerce-result-count,
.wc-block-product-results-count {
	color: var(--shs-text, #6e6e6e);
	opacity: 1;
}

.wc-block-components-checkout-step__heading,
.wc-block-components-title,
.wc-block-components-totals-item__label,
.wc-block-cart__totals-title {
	font-family: lato, Helvetica, Tahoma, Geneva, Arial, sans-serif;
	color: var(--shs-heading, #333);
}

/* ------------------------------------------------------------------ */
/* Form fields: 3:1 borders, visible labels, SHS focus ring            */
/* ------------------------------------------------------------------ */

.wc-block-components-text-input :is(input, textarea),
.wc-blocks-components-select .wc-blocks-components-select__select,
.wc-block-components-combobox .wc-block-components-combobox-control input,
.woocommerce form .form-row :is(.input-text, select, textarea),
.woocommerce .quantity .qty {
	border: 1px solid #767676; /* 4.5:1 against white */
	border-radius: 3px;
	color: var(--shs-heading, #333);
}

.wc-block-components-text-input label,
.wc-blocks-components-select label,
.woocommerce form .form-row label {
	color: var(--shs-text, #6e6e6e);
}

.wc-block-components-text-input :is(input, textarea):focus,
.wc-blocks-components-select .wc-blocks-components-select__select:focus,
.woocommerce form .form-row :is(.input-text, select, textarea):focus {
	outline: 3px solid var(--shs-focus, #1b2a2f);
	outline-offset: 1px;
	border-color: var(--shs-teal-dark, #3b5d68);
	box-shadow: none;
}

.wc-block-components-validation-error,
.woocommerce form .form-row.woocommerce-invalid label,
.woocommerce form .required {
	color: #b32d2e; /* 6.0:1 */
}

/* ------------------------------------------------------------------ */
/* Notices                                                             */
/* ------------------------------------------------------------------ */

.woocommerce-message,
.woocommerce-info,
.wc-block-components-notice-banner.is-success,
.wc-block-components-notice-banner.is-info {
	background: #eef3f5;
	border-color: var(--shs-teal, #4a7482);
	color: var(--shs-heading, #333);
}

.woocommerce-message::before,
.woocommerce-info::before {
	color: var(--shs-teal, #4a7482);
}

.woocommerce-error,
.wc-block-components-notice-banner.is-error {
	background: #fbeeee;
	border-color: #b32d2e;
	color: var(--shs-heading, #333);
}

.wc-block-components-notice-banner.is-success > svg,
.wc-block-components-notice-banner.is-info > svg {
	background-color: var(--shs-teal, #4a7482);
}

/* ------------------------------------------------------------------ */
/* Header mini-cart & account icons (added to the nav by WooCommerce)  */
/* ------------------------------------------------------------------ */

.shs-navbar :is(.wc-block-mini-cart__button, .wp-block-woocommerce-customer-account a) {
	color: var(--shs-text, #6e6e6e);
}

.shs-navbar :is(.wc-block-mini-cart__button, .wp-block-woocommerce-customer-account a):hover {
	color: var(--shs-teal-dark, #3b5d68);
}

.wc-block-mini-cart__badge {
	background-color: var(--shs-orange, #c25310) !important;
	color: #fff !important;
}

/* Star ratings */
.woocommerce .star-rating span::before,
.wc-block-components-product-rating__stars span::before {
	color: var(--shs-orange, #c25310);
}
