/**
 * FM Farm – WooCommerce Cart / Checkout / Product blocks
 */

.wc-block-components-button,
.wc-block-cart__submit-button,
.wc-block-checkout__actions_row .wc-block-components-checkout-place-order-button,
.wp-block-woocommerce-product-button .add_to_cart_button {
	background: var(--fm-honey) !important;
	color: var(--fm-brown) !important;
	border: 0 !important;
	border-radius: 999px !important;
	font-weight: 600 !important;
	font-family: var(--fm-font-body) !important;
}

.wc-block-components-button:hover,
.wc-block-cart__submit-button:hover,
.wc-block-checkout__actions_row .wc-block-components-checkout-place-order-button:hover {
	background: var(--fm-honey-dark) !important;
	color: var(--fm-brown) !important;
}

.wc-block-components-button:focus {
	box-shadow: 0 0 0 3px rgba(232, 185, 77, 0.35) !important;
}

.wc-block-cart,
.wc-block-checkout,
.wp-block-woocommerce-cart,
.wp-block-woocommerce-checkout {
	color: var(--fm-brown);
}

.wc-block-components-product-name,
.wc-block-components-product-metadata {
	color: var(--fm-brown);
}

.wc-block-components-product-price,
.wc-block-components-order-summary-item__total-price,
.wc-block-components-totals-item__value {
	color: var(--fm-honey-dark);
	font-weight: 600;
}

.wc-block-components-product-price ins {
	color: #c0392b;
	text-decoration: none;
}

.wc-block-components-sale-badge,
.wc-block-components-product-badge {
	background: var(--fm-honey) !important;
	color: var(--fm-brown) !important;
	border: 0 !important;
	border-radius: 999px !important;
	font-weight: 700;
}

.wc-block-components-text-input input,
.wc-block-components-textarea,
.wc-block-components-combobox input,
.wc-block-components-select select {
	border-color: rgba(61, 43, 31, 0.15) !important;
	border-radius: 6px !important;
	color: var(--fm-brown) !important;
}

.wc-block-components-text-input.is-active input,
.wc-block-components-text-input input:focus {
	border-color: var(--fm-honey) !important;
	box-shadow: 0 0 0 3px rgba(232, 185, 77, 0.2) !important;
}

.wc-block-components-panel,
.wc-block-components-totals-wrapper,
.wc-block-cart__sidebar,
.wc-block-checkout__sidebar {
	background: var(--fm-white);
	border-radius: 10px;
}

.wc-block-components-notice-banner {
	border-radius: 8px;
}

.wc-block-components-notice-banner.is-success {
	border-color: var(--fm-honey);
	background: var(--fm-cream);
}

.wc-block-grid__products {
	gap: 1.25rem !important;
}

.wc-block-grid__product {
	background: var(--fm-white);
	border-radius: 10px;
	box-shadow: 0 4px 20px rgba(61, 43, 31, 0.08);
	overflow: hidden;
	padding-bottom: 1rem;
}

.wc-block-grid__product-title {
	font-family: var(--fm-font-heading) !important;
	color: var(--fm-brown) !important;
}

.wc-block-grid__product-price {
	color: var(--fm-honey-dark) !important;
	font-weight: 600;
}

.wc-block-components-quantity-selector {
	border-radius: 6px !important;
	border-color: rgba(61, 43, 31, 0.15) !important;
}

.wc-block-components-radio-control-accordion-option,
.wc-block-components-radio-control__option {
	border-radius: 8px;
}

.wc-block-components-checkout-step__title,
.wc-block-components-title {
	font-family: var(--fm-font-heading) !important;
	color: var(--fm-brown) !important;
}

.wp-block-woocommerce-product-price .wc-block-components-product-price {
	color: var(--fm-honey-dark);
}

.wp-block-woocommerce-product-image img {
	border-radius: 8px;
}

/* WooCommerce Cart/Checkout container queries (WC 10+ recommended) */
.wp-block-woocommerce-cart,
.wp-block-woocommerce-checkout,
.wc-block-cart,
.wc-block-checkout {
	container-type: inline-size;
	container-name: fmfarm-wc;
}

@container fmfarm-wc (max-width: 700px) {
	.wc-block-components-sidebar-layout {
		flex-direction: column !important;
	}

	.wc-block-components-main,
	.wc-block-components-sidebar {
		width: 100% !important;
		max-width: 100% !important;
	}
}

@container fmfarm-wc (max-width: 520px) {
	.wc-block-components-button,
	.wc-block-cart__submit-button,
	.wc-block-checkout__actions_row .wc-block-components-checkout-place-order-button {
		width: 100% !important;
		min-height: 44px;
	}

	.wc-block-cart-items,
	.wc-block-components-order-summary {
		font-size: 0.9rem;
	}
}

@container fmfarm-wc (max-width: 400px) {
	.wc-block-components-product-name {
		font-size: 0.9rem;
	}

	.wc-block-components-quantity-selector {
		width: 100%;
	}
}

/* Legacy WC block size classes fallback */
.wc-block-cart.is-mobile .wc-block-components-button,
.wc-block-checkout.is-mobile .wc-block-components-checkout-place-order-button,
.wc-block-cart.is-small .wc-block-components-button,
.wc-block-checkout.is-small .wc-block-components-checkout-place-order-button {
	width: 100% !important;
	min-height: 44px;
}

@media (max-width: 782px) {
	.wc-block-grid__products {
		grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
	}
}

@media (max-width: 480px) {
	.wc-block-grid__products {
		grid-template-columns: 1fr !important;
	}
}
