/**
 * Final compatibility layer for sites migrated from commercial themes.
 * It is intentionally scoped to Brandina-owned output.
 */
body.brandina-strict-template-owner,
body.brandina-strict-template-owner .brandina-site-header,
body.brandina-strict-template-owner .brandina-footer,
body.brandina-strict-template-owner .brandina-home,
body.brandina-strict-template-owner .brandina-shop-page,
body.brandina-strict-template-owner .brandina-single-product,
body.brandina-strict-template-owner .brandina-cart-page,
body.brandina-strict-template-owner .brandina-checkout-page,
body.brandina-strict-template-owner .brandina-account-shell,
body.brandina-strict-template-owner .woocommerce {
	font-family: var(--brandina-font-family, "Brandina Vazirmatn", "Vazirmatn", Tahoma, Arial, sans-serif) !important;
}

body.brandina-strict-template-owner :where(.brandina-site-header,.brandina-footer,.brandina-home,.brandina-shop-page,.brandina-single-product,.brandina-cart-page,.brandina-checkout-page,.brandina-account-shell) *,
body.brandina-strict-template-owner :where(.woocommerce,.woocommerce-page) :where(a,button,input,select,textarea,label,p,li,strong,small,h1,h2,h3,h4,h5,h6,table,th,td) {
	font-family: inherit;
}

body.brandina-strict-template-owner :where(.brandina-home,.brandina-shop-page,.brandina-single-product,.brandina-cart-page,.brandina-checkout-page,.brandina-account-shell),
body.brandina-strict-template-owner :where(.brandina-home,.brandina-shop-page,.brandina-single-product,.brandina-cart-page,.brandina-checkout-page,.brandina-account-shell) * {
	box-sizing: border-box;
}

body.brandina-strict-template-owner .brandina-product-section,
body.brandina-strict-template-owner .brandina-product-viewport,
body.brandina-strict-template-owner .brandina-product-list,
body.brandina-strict-template-owner .brandina-product-card,
body.brandina-strict-template-owner .brandina-category-grid,
body.brandina-strict-template-owner .brandina-category-card,
body.brandina-strict-template-owner .brandina-ranked-list,
body.brandina-strict-template-owner .brandina-ranked-item {
	float: none !important;
	max-width: none;
}

body.brandina-strict-template-owner .brandina-product-list,
body.brandina-strict-template-owner .brandina-category-grid,
body.brandina-strict-template-owner .brandina-ranked-list {
	list-style: none !important;
	margin-inline: 0 !important;
}

body.brandina-strict-template-owner .brandina-product-list > *,
body.brandina-strict-template-owner .brandina-category-grid > *,
body.brandina-strict-template-owner .brandina-ranked-list > * {
	min-width: 0;
	max-width: none !important;
}

body.brandina-strict-template-owner .brandina-product-card {
	width: auto !important;
	margin: 0 !important;
	clear: none !important;
}

body.brandina-strict-template-owner .brandina-product-card img,
body.brandina-strict-template-owner .brandina-category-card img,
body.brandina-strict-template-owner .brandina-ranked-item img {
	max-width: 100% !important;
}

body.brandina-strict-template-owner .brandina-product-section.layout-grid .brandina-product-list {
	display: grid !important;
	grid-template-columns: repeat(var(--product-cols-d, 5), minmax(0, 1fr)) !important;
	gap: var(--product-gap-d, 10px) !important;
}

body.brandina-strict-template-owner .brandina-product-section.layout-slider .brandina-product-list {
	display: grid !important;
	grid-auto-flow: column !important;
	grid-template-columns: none !important;
	grid-auto-columns: calc((100% - (var(--brandina-products-visible, var(--product-cols-d, 5)) - 1) * var(--brandina-products-gap, var(--product-gap-d, 10px))) / var(--brandina-products-visible, var(--product-cols-d, 5))) !important;
	gap: var(--brandina-products-gap, var(--product-gap-d, 10px)) !important;
}

@media (max-width: 1024px) {
	body.brandina-strict-template-owner .brandina-product-section.layout-grid .brandina-product-list {
		grid-template-columns: repeat(var(--product-cols-t, 3), minmax(0, 1fr)) !important;
	}
}

@media (max-width: 767px) {
	body.brandina-strict-template-owner .brandina-product-section.layout-grid .brandina-product-list {
		grid-template-columns: repeat(var(--product-cols-m, 2), minmax(0, 1fr)) !important;
		gap: var(--product-gap-m, 7px) !important;
	}
}
