/*
 * Cartonomic: WooCommerce styling.
 * Loaded only on shop, product, cart, checkout and account pages.
 * Shop content sits on an off-white panel for easy reading; header and footer stay dark.
 */

body.cn-shop main,
body.cn-shop .wp-site-blocks > main {
	background: var(--wp--preset--color--offwhite);
	color: var(--wp--preset--color--charcoal);
	padding-top: var(--wp--preset--spacing--50);
	padding-bottom: var(--wp--preset--spacing--60);
}
body.cn-shop main a:not(.wp-element-button):not(.button) { color: var(--wp--preset--color--accent-deep); }
body.cn-shop main h1,
body.cn-shop main h2,
body.cn-shop main h3 { color: var(--wp--preset--color--charcoal); }

/* Buttons: WooCommerce classic and block buttons */
body.cn-shop .button,
body.cn-shop button.button,
body.cn-shop .wc-block-components-button:not(.is-link),
body.cn-shop .wp-block-button__link,
body.cn-shop .add_to_cart_button,
body.cn-shop .single_add_to_cart_button {
	background: var(--wp--preset--color--charcoal);
	color: var(--wp--preset--color--offwhite);
	border: 0;
	border-radius: 2px;
	font-family: var(--wp--preset--font-family--display);
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	padding: 0.85rem 1.5rem;
	text-decoration: none;
}
body.cn-shop .wc-block-cart__submit-button,
body.cn-shop .wc-block-components-checkout-place-order-button,
body.cn-shop .single_add_to_cart_button,
body.cn-shop .checkout-button {
	background: var(--wp--preset--color--accent);
	color: var(--wp--preset--color--accent-contrast);
}
body.cn-shop .button:hover,
body.cn-shop .wc-block-components-button:not(.is-link):hover,
body.cn-shop .wp-block-button__link:hover {
	background: var(--wp--preset--color--accent-deep);
	color: #fff;
}

/* Product grid */
body.cn-shop .wc-block-product,
body.cn-shop ul.products li.product {
	background: #fff;
	border-top: 4px solid var(--wp--preset--color--accent);
	padding-bottom: 1rem;
	text-align: left;
}
body.cn-shop .wc-block-components-product-name,
body.cn-shop .woocommerce-loop-product__title,
body.cn-shop .product_title {
	font-family: var(--wp--preset--font-family--display);
	font-weight: 800;
	text-transform: uppercase;
	text-decoration: none;
}
body.cn-shop .wc-block-components-product-price,
body.cn-shop .price { font-weight: 700; color: var(--wp--preset--color--charcoal); }

/* Sale badge: accessible contrast */
body.cn-shop .wc-block-components-product-sale-badge,
body.cn-shop span.onsale {
	background: var(--wp--preset--color--charcoal);
	color: var(--wp--preset--color--offwhite);
	border: 0;
	border-radius: 2px;
}

/* Form fields in cart, checkout and account */
body.cn-shop .wc-block-components-text-input input,
body.cn-shop .wc-block-components-combobox .wc-block-components-combobox-control input,
body.cn-shop .woocommerce form .form-row input.input-text,
body.cn-shop .woocommerce form .form-row textarea,
body.cn-shop select {
	border: 2px solid #6b6f75;
	border-radius: 2px;
	background: #fff;
	color: var(--wp--preset--color--charcoal);
}
body.cn-shop .wc-block-components-text-input label,
body.cn-shop .wc-block-components-checkbox label { color: var(--wp--preset--color--ink-muted); }

/* Notices */
body.cn-shop .wc-block-components-notice-banner,
body.cn-shop .woocommerce-message,
body.cn-shop .woocommerce-info,
body.cn-shop .woocommerce-error {
	border-left: 4px solid var(--wp--preset--color--accent-deep);
	background: #fff;
	color: var(--wp--preset--color--charcoal);
}

/* Order summary and totals panels */
body.cn-shop .wc-block-components-sidebar,
body.cn-shop .wc-block-components-totals-wrapper { border-color: rgba(22, 24, 27, 0.15); }
