/**
 * Native WooCommerce block primitives for Hera.
 *
 * Keep this module focused: direct Woo blocks only, not Hera product cards or
 * the cart/checkout page skin handled by woocommerce/cart-checkout.css.
 */

:where(body.actorshop, .editor-styles-wrapper) {
	--actorshop-wc-block-gap: clamp(14px, 2vw, 22px);
	--actorshop-wc-block-panel: clamp(14px, 1.8vw, 20px);
	--actorshop-wc-block-line: var(--actorshop-line, #d6d6d6);
	--actorshop-wc-block-line-strong: var(--actorshop-line-strong, #b8b8b8);
	--actorshop-wc-block-muted: var(--actorshop-muted, #626262);
	--actorshop-wc-block-soft: var(--actorshop-surface-alt, #f6f6f6);
	--actorshop-wc-block-text: var(--actorshop-text, #111111);
	--actorshop-wc-block-surface: var(--actorshop-surface, #ffffff);
}

:where(body.actorshop, .editor-styles-wrapper) :where(.wp-block-woocommerce-product-collection, .wp-block-woocommerce-product-template, .wc-block-grid, .wp-block-woocommerce-featured-product, .wp-block-woocommerce-featured-category, .wp-block-woocommerce-product-categories, .wp-block-woocommerce-product-search, .wp-block-woocommerce-attribute-filter, .wp-block-woocommerce-price-filter, .wp-block-woocommerce-stock-filter, .wp-block-woocommerce-rating-filter, .wp-block-woocommerce-active-filters, .wp-block-woocommerce-reviews-by-product, .wp-block-woocommerce-reviews-by-category, .wp-block-woocommerce-all-reviews) {
	font-family: var(--actorshop-font-ui, Inter, ui-sans-serif, system-ui, sans-serif);
	color: var(--actorshop-wc-block-text);
}

:where(body.actorshop, .editor-styles-wrapper) :where(.wp-block-woocommerce-product-collection.is-style-hera-commerce-grid, .wp-block-woocommerce-product-template.is-style-hera-commerce-grid, .wc-block-grid) {
	margin-block: var(--actorshop-wc-block-gap);
}

:where(body.actorshop, .editor-styles-wrapper) :where(.wc-block-components-button:not(.is-link), .wp-block-button__link.wc-block-components-button:not(.is-link)) {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: var(--actorshop-button-height, 44px);
	padding: 0 18px;
	border: 1px solid var(--actorshop-wc-block-text);
	border-radius: 0;
	background: var(--actorshop-wc-block-text);
	color: var(--actorshop-on-ink, #ffffff);
	font-family: var(--actorshop-font-ui, inherit);
	font-size: var(--actorshop-size-button, 13px);
	font-weight: var(--actorshop-weight-button, 850);
	line-height: 1;
	text-transform: uppercase;
	text-decoration: none;
	box-shadow: none;
	transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}

:where(body.actorshop, .editor-styles-wrapper) :where(.wc-block-components-button:not(.is-link), .wp-block-button__link.wc-block-components-button:not(.is-link)):hover,
:where(body.actorshop, .editor-styles-wrapper) :where(.wc-block-components-button:not(.is-link), .wp-block-button__link.wc-block-components-button:not(.is-link)):focus {
	border-color: var(--actorshop-wc-block-text);
	background: transparent;
	color: var(--actorshop-wc-block-text);
	text-decoration: none;
}

:where(body.actorshop, .editor-styles-wrapper) :where(.wc-block-components-text-input input, .wc-block-components-combobox .wc-block-components-combobox-control input.components-combobox-control__input, .wc-block-components-form .wc-block-components-text-input input, .wc-block-components-select select, .wc-block-components-quantity-selector input, .wc-block-product-search__field, .wc-block-components-price-slider__amount input) {
	min-height: var(--actorshop-input-height, 44px);
	border: 1px solid var(--actorshop-control-border, var(--actorshop-wc-block-line));
	border-radius: 0;
	background: var(--actorshop-wc-block-surface);
	color: var(--actorshop-wc-block-text);
	font-family: var(--actorshop-font-ui, inherit);
	font-size: var(--actorshop-p2-size, 15px);
	box-shadow: none;
}

:where(body.actorshop, .editor-styles-wrapper) :where(.wc-block-components-text-input input, .wc-block-components-select select, .wc-block-product-search__field):focus {
	border-color: var(--actorshop-control-border-strong, var(--actorshop-wc-block-text));
	outline: 0;
	box-shadow: 0 0 0 1px var(--actorshop-control-border-strong, var(--actorshop-wc-block-text));
}

:where(body.actorshop, .editor-styles-wrapper) :where(.wc-block-grid__products, .wp-block-woocommerce-product-template.is-style-hera-commerce-grid) {
	display: grid;
	grid-template-columns: repeat(var(--actorshop-wc-block-columns, 4), minmax(0, 1fr));
	gap: var(--actorshop-wc-block-gap);
	padding: 0;
	list-style: none;
}

:where(body.actorshop, .editor-styles-wrapper) :where(.wc-block-grid__product, .wp-block-woocommerce-product-template.is-style-hera-commerce-grid > li, .wp-block-post.product) {
	display: flex;
	flex-direction: column;
	min-width: 0;
	min-height: var(--actorshop-product-card-list-item-min-height, 0px);
	height: var(--actorshop-product-card-list-item-height, auto);
	max-height: var(--actorshop-product-card-list-item-max-height, none);
	padding: var(--actorshop-wc-block-panel);
	border: 1px solid var(--actorshop-card-border-color, var(--actorshop-wc-block-line));
	border-radius: var(--actorshop-card-radius, 0);
	background: var(--actorshop-wc-block-surface);
}

:where(body.actorshop, .editor-styles-wrapper) :where(.wc-block-grid__product-image, .wc-block-components-product-image, .wp-block-woocommerce-product-image) {
	display: grid;
	place-items: center;
	aspect-ratio: var(--actorshop-product-card-media-ratio, 1 / 1);
	margin: 0 0 16px;
	background: var(--actorshop-wc-block-surface);
}

:where(body.actorshop, .editor-styles-wrapper) :where(.wc-block-grid__product-image img, .wc-block-components-product-image img, .wp-block-woocommerce-product-image img) {
	width: 100%;
	height: 100%;
	object-fit: contain;
}

:where(body.actorshop, .editor-styles-wrapper) :where(.wc-block-grid__product-title, .wc-block-components-product-title, .wp-block-post.product .wp-block-post-title, .wp-block-woocommerce-product-title) {
	margin: 0 0 10px;
	color: var(--actorshop-wc-block-text);
	font-family: var(--actorshop-font-display, Inter, ui-sans-serif, system-ui, sans-serif);
	font-size: var(--actorshop-size-product-title, 15px);
	font-weight: var(--actorshop-weight-product-title, 850);
	letter-spacing: 0;
	line-height: 1.16;
	text-transform: uppercase;
}

:where(body.actorshop, .editor-styles-wrapper) :where(.wc-block-grid__product-title a, .wc-block-components-product-title a, .wp-block-post.product .wp-block-post-title a, .wp-block-woocommerce-product-title a) {
	color: inherit;
	text-decoration: none;
}

:where(body.actorshop, .editor-styles-wrapper) :where(.wc-block-grid__product-price, .wc-block-components-product-price, .wp-block-woocommerce-product-price) {
	margin-top: auto;
	color: var(--actorshop-wc-block-text);
	font-weight: 900;
}

:where(body.actorshop, .editor-styles-wrapper) :where(.wc-block-grid__product-onsale, .wc-block-components-product-sale-badge, .wc-block-components-sale-badge) {
	min-height: 0;
	padding: 7px 9px;
	border: 1px solid var(--actorshop-wc-block-text);
	border-radius: 0;
	background: var(--actorshop-wc-block-surface);
	color: var(--actorshop-wc-block-text);
	font-size: var(--actorshop-size-label, 12px);
	font-weight: var(--actorshop-weight-label, 850);
	line-height: 1;
	text-transform: uppercase;
}

:where(body.actorshop, .editor-styles-wrapper) :where(.wp-block-woocommerce-featured-product.is-style-hera-feature, .wp-block-woocommerce-featured-category.is-style-hera-feature) {
	display: grid;
	align-content: end;
	min-height: clamp(300px, 44vw, 520px);
	padding: clamp(24px, 4vw, 56px);
	border: 1px solid var(--actorshop-wc-block-line);
	border-radius: 0;
	background-color: var(--actorshop-wc-block-text);
	color: var(--actorshop-on-ink, #ffffff);
	overflow: hidden;
}

:where(body.actorshop, .editor-styles-wrapper) :where(.wp-block-woocommerce-featured-product__title, .wp-block-woocommerce-featured-category__title) {
	margin: 0;
	color: inherit;
	font-family: var(--actorshop-font-display, Inter, ui-sans-serif, system-ui, sans-serif);
	font-size: clamp(34px, 5vw, 72px);
	font-weight: var(--actorshop-weight-display, 900);
	letter-spacing: 0;
	line-height: 0.96;
	text-transform: uppercase;
}

:where(body.actorshop, .editor-styles-wrapper) :where(.wp-block-woocommerce-product-categories.is-style-hera-panel, .wp-block-woocommerce-attribute-filter.is-style-hera-filter, .wp-block-woocommerce-price-filter.is-style-hera-filter, .wp-block-woocommerce-stock-filter.is-style-hera-filter, .wp-block-woocommerce-rating-filter.is-style-hera-filter, .wp-block-woocommerce-active-filters.is-style-hera-filter) {
	padding: var(--actorshop-wc-block-panel);
	border: 1px solid var(--actorshop-wc-block-line);
	background: var(--actorshop-wc-block-surface);
}

:where(body.actorshop, .editor-styles-wrapper) :where(.wc-block-components-filter-submit-button, .wc-block-product-search__button) {
	border-radius: 0;
}

:where(body.actorshop, .editor-styles-wrapper) :where(.wc-block-components-checkbox__input, .wc-block-components-radio-control__input) {
	border-color: var(--actorshop-control-border-strong, var(--actorshop-wc-block-line-strong));
	border-radius: 0;
}

:where(body.actorshop, .editor-styles-wrapper) :where(.wc-block-review-list-item__item, .wc-block-review-list-item__info) {
	border-color: var(--actorshop-wc-block-line);
}

:where(body.actorshop, .editor-styles-wrapper) :where(.wp-block-woocommerce-all-reviews.is-style-hera-reviews, .wp-block-woocommerce-reviews-by-product.is-style-hera-reviews, .wp-block-woocommerce-reviews-by-category.is-style-hera-reviews) {
	padding: var(--actorshop-wc-block-panel);
	border: 1px solid var(--actorshop-wc-block-line);
	background: var(--actorshop-wc-block-surface);
}

@media (max-width: 900px) {
	:where(body.actorshop, .editor-styles-wrapper) :where(.wc-block-grid__products, .wp-block-woocommerce-product-template.is-style-hera-commerce-grid) {
		--actorshop-wc-block-columns: 2;
	}
}

@media (max-width: 520px) {
	:where(body.actorshop, .editor-styles-wrapper) {
		--actorshop-wc-block-gap: 12px;
		--actorshop-wc-block-panel: 10px;
	}
}
