/**
 * 777 Design System — priority components (V1B).
 *
 * Scope: approved editorial CTAs, WooCommerce product CTAs and loop cards.
 * Checkout, cart, account actions, form submits, filters and AJAX behaviour are
 * intentionally outside this file.
 */

/* --------------------------------------------------------------------------
 * CTA — RV01 / Homepage reference
 * ----------------------------------------------------------------------- */

html body.woocommerce-shop #page .wp-block-button[class*="ts-btn-"] > a.wp-block-button__link.wp-element-button,
html body.woocommerce-shop #page .woocommerce-products-header .ts-mini-tile .wp-block-button.link-arrow > a.wp-block-button__link.wp-element-button,
html body.page-id-1005 #page a.uagb-buttons-repeater.wp-block-button__link,
html body.page-id-1432 #page a.uagb-buttons-repeater.wp-block-button__link,
html body.single-product.woocommerce.woocommerce-page #page div.product form.cart .single_add_to_cart_button.button,
html body.woocommerce.woocommerce-page #page ul.products li.product:not(.product-category) .astra-shop-summary-wrap > a.button.button,
html body.home #page .woocommerce ul.products li.product:not(.product-category) .astra-shop-summary-wrap > a.button.button {
	box-sizing: border-box !important;
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	max-width: 100% !important;
	min-height: 46px !important;
	padding: var(--777-space-cta-block) var(--777-space-cta-inline) !important;
	border: var(--777-border-width-cta) solid transparent !important;
	border-radius: var(--777-radius-pill) !important;
	background:
		linear-gradient(rgba(0, 0, 0, 0.70), rgba(0, 0, 0, 0.70)) padding-box,
		linear-gradient(135deg, var(--777-color-gold-light), var(--777-color-gold)) border-box !important;
	box-shadow: var(--777-glow-cta) !important;
	color: var(--777-color-gold) !important;
	font-family: var(--777-font-body) !important;
	font-size: 12px !important;
	font-weight: 700 !important;
	line-height: 1.2 !important;
	letter-spacing: var(--777-letter-spacing-cta) !important;
	text-align: center !important;
	text-decoration: none !important;
	text-transform: uppercase !important;
	white-space: normal !important;
}

html body.woocommerce-shop #page .wp-block-button[class*="ts-btn-"] > a.wp-block-button__link.wp-element-button:hover,
html body.woocommerce-shop #page .woocommerce-products-header .ts-mini-tile .wp-block-button.link-arrow > a.wp-block-button__link.wp-element-button:hover,
html body.page-id-1005 #page a.uagb-buttons-repeater.wp-block-button__link:hover,
html body.page-id-1432 #page a.uagb-buttons-repeater.wp-block-button__link:hover,
html body.single-product.woocommerce.woocommerce-page #page div.product form.cart .single_add_to_cart_button.button:hover,
html body.woocommerce.woocommerce-page #page ul.products li.product:not(.product-category) .astra-shop-summary-wrap > a.button.button:hover,
html body.home #page .woocommerce ul.products li.product:not(.product-category) .astra-shop-summary-wrap > a.button.button:hover {
	box-shadow: var(--777-glow-cta-hover) !important;
	color: var(--777-color-gold-light) !important;
}

html body.woocommerce-shop #page .wp-block-button[class*="ts-btn-"] > a.wp-block-button__link.wp-element-button:focus-visible,
html body.woocommerce-shop #page .woocommerce-products-header .ts-mini-tile .wp-block-button.link-arrow > a.wp-block-button__link.wp-element-button:focus-visible,
html body.page-id-1005 #page a.uagb-buttons-repeater.wp-block-button__link:focus-visible,
html body.page-id-1432 #page a.uagb-buttons-repeater.wp-block-button__link:focus-visible,
html body.single-product.woocommerce.woocommerce-page #page div.product form.cart .single_add_to_cart_button.button:focus-visible,
html body.woocommerce.woocommerce-page #page ul.products li.product:not(.product-category) .astra-shop-summary-wrap > a.button.button:focus-visible,
html body.home #page .woocommerce ul.products li.product:not(.product-category) .astra-shop-summary-wrap > a.button.button:focus-visible {
	outline: 2px solid var(--777-color-gold-light) !important;
	outline-offset: 3px !important;
}

/*
 * Spectra nests an element named .uagb-button__link inside the anchor. A
 * legacy global rule was applying the CTA min-height to both layers, doubling
 * the visual height. This resets presentation only; the anchor and href remain
 * unchanged.
 */
html body.page-id-1005 #page a.uagb-buttons-repeater.wp-block-button__link > .uagb-button__link,
html body.page-id-1432 #page a.uagb-buttons-repeater.wp-block-button__link > .uagb-button__link {
	display: block !important;
	min-height: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	border-radius: 0 !important;
	background: transparent !important;
	box-shadow: none !important;
}

/* Preserve disabled WooCommerce states without changing their behaviour. */
html body.single-product.woocommerce.woocommerce-page #page div.product form.cart .single_add_to_cart_button.button.disabled,
html body.single-product.woocommerce.woocommerce-page #page div.product form.cart .single_add_to_cart_button.button:disabled {
	opacity: 0.5 !important;
}

/* --------------------------------------------------------------------------
 * Product Card — RV02
 * ----------------------------------------------------------------------- */

html body.woocommerce ul.products li.product:not(.product-category),
html body.home #page .woocommerce ul.products li.product:not(.product-category) {
	box-sizing: border-box !important;
	display: flex !important;
	flex-direction: column !important;
	align-self: stretch !important;
	min-width: 0 !important;
	padding: 16px !important;
	border: 1px solid var(--777-color-border-subtle) !important;
	border-radius: 0 !important;
	background: var(--777-color-surface) !important;
}

html body.woocommerce ul.products li.product:not(.product-category) .astra-shop-thumbnail-wrap,
html body.home #page .woocommerce ul.products li.product:not(.product-category) .astra-shop-thumbnail-wrap {
	width: 100% !important;
	min-width: 0 !important;
}

html body.woocommerce ul.products li.product:not(.product-category) .astra-shop-thumbnail-wrap img,
html body.home #page .woocommerce ul.products li.product:not(.product-category) .astra-shop-thumbnail-wrap img {
	display: block !important;
	width: 100% !important;
	height: auto !important;
	margin: 0 !important;
}

html body.woocommerce ul.products li.product:not(.product-category) .astra-shop-summary-wrap,
html body.home #page .woocommerce ul.products li.product:not(.product-category) .astra-shop-summary-wrap {
	box-sizing: border-box !important;
	display: flex !important;
	flex: 1 1 auto !important;
	flex-direction: column !important;
	align-items: center !important;
	width: 100% !important;
	min-width: 0 !important;
	padding: 18px !important;
	text-align: center !important;
}

html body.woocommerce ul.products li.product:not(.product-category) .ast-woo-product-category,
html body.home #page .woocommerce ul.products li.product:not(.product-category) .ast-woo-product-category {
	order: 1;
	color: var(--777-color-text-muted) !important;
	font-family: var(--777-font-body) !important;
	font-size: 12px !important;
	font-weight: var(--777-font-weight-body) !important;
	line-height: 1.3 !important;
}

html body.woocommerce ul.products li.product:not(.product-category) .woocommerce-loop-product__title,
html body.home #page .woocommerce ul.products li.product:not(.product-category) .woocommerce-loop-product__title {
	order: 2;
	margin: 8px 0 7px !important;
	color: var(--777-color-text) !important;
	font-family: var(--777-font-display) !important;
	font-size: 13px !important;
	font-weight: var(--777-font-weight-display) !important;
	line-height: 1.4 !important;
	letter-spacing: 1px !important;
	text-transform: uppercase !important;
}

html body.woocommerce ul.products li.product:not(.product-category) .price,
html body.home #page .woocommerce ul.products li.product:not(.product-category) .price {
	order: 3;
	margin: 0 0 8px !important;
	color: var(--777-color-gold) !important;
	font-family: var(--777-font-body) !important;
	font-size: 15px !important;
	font-weight: 700 !important;
	line-height: 1.3 !important;
}

html body.woocommerce.woocommerce-page #page ul.products li.product:not(.product-category) .astra-shop-summary-wrap > a.button.button,
html body.home #page .woocommerce ul.products li.product:not(.product-category) .astra-shop-summary-wrap > a.button.button {
	order: 4;
	align-self: center !important;
	width: auto !important;
	margin: auto auto 0 !important;
}

/* The duplicate image-overlay action is already hidden by the current design. */
html body.woocommerce ul.products li.product:not(.product-category) .ast-on-card-button,
html body.home #page .woocommerce ul.products li.product:not(.product-category) .ast-on-card-button {
	display: none !important;
}

@media (max-width: 544px) {
	html body.woocommerce-shop #page .wp-block-button[class*="ts-btn-"] > a.wp-block-button__link.wp-element-button,
	html body.woocommerce-shop #page .woocommerce-products-header .ts-mini-tile .wp-block-button.link-arrow > a.wp-block-button__link.wp-element-button,
	html body.page-id-1005 #page a.uagb-buttons-repeater.wp-block-button__link,
	html body.page-id-1432 #page a.uagb-buttons-repeater.wp-block-button__link,
	html body.single-product.woocommerce.woocommerce-page #page div.product form.cart .single_add_to_cart_button.button,
	html body.woocommerce.woocommerce-page #page ul.products li.product:not(.product-category) .astra-shop-summary-wrap > a.button.button,
	html body.home #page .woocommerce ul.products li.product:not(.product-category) .astra-shop-summary-wrap > a.button.button {
		height: auto !important;
		min-height: 44px !important;
		padding: 12px 22px !important;
		letter-spacing: 1.2px !important;
	}

	/*
	 * A regra mobile legada das páginas Spectra repete o mesmo seletor depois
	 * do child theme e impõe 68px. O wrapper real acrescenta a especificidade
	 * mínima necessária sem tocar noutros botões ou na lógica dos links.
	 */
	html body.page-id-1005 #page .uagb-buttons__outer-wrap a.uagb-buttons-repeater.wp-block-button__link,
	html body.page-id-1432 #page .uagb-buttons__outer-wrap a.uagb-buttons-repeater.wp-block-button__link {
		height: auto !important;
		min-height: 44px !important;
		padding: 12px 22px !important;
		letter-spacing: 1.2px !important;
	}

	html body.woocommerce ul.products li.product:not(.product-category),
	html body.home #page .woocommerce ul.products li.product:not(.product-category) {
		padding: 12px !important;
	}

	html body.woocommerce ul.products li.product:not(.product-category) .astra-shop-summary-wrap,
	html body.home #page .woocommerce ul.products li.product:not(.product-category) .astra-shop-summary-wrap {
		padding: 16px 8px !important;
	}
}
