HEX
Server: nginx/1.24.0
System: Linux 0c1023d6c65e 6.8.0-137-generic #137-Ubuntu SMP PREEMPT_DYNAMIC Fri Jul 17 20:28:23 UTC 2026 x86_64
User: root (0)
PHP: 8.3.33
Disabled: NONE
Upload Files
File: /var/www/html/wp-content/mu-plugins/ethnic-magento-b2b-solutions-page.php
<?php
/**
 * Plugin Name: Ethnic Magento B2B Solutions Page
 * Description: Creates and renders the Magento B2B Solutions sub-service page beneath Magento Development.
 * Version: 1.0.0
 */

if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

function ethnic_magento_b2b_parent_id() {
	$parent = get_page_by_path( 'services/ecommerce-development/magento-development' );
	return $parent instanceof WP_Post ? (int) $parent->ID : 0;
}

function ethnic_magento_b2b_target_page() {
	$page = get_page_by_path( 'services/ecommerce-development/magento-development/magento-b2b-solutions' );
	return $page instanceof WP_Post ? $page : null;
}

function ethnic_magento_b2b_ensure_page() {
	$parent_id = ethnic_magento_b2b_parent_id();
	if ( ! $parent_id ) {
		return;
	}
	$page = ethnic_magento_b2b_target_page();
	$post = array(
		'post_type' => 'page', 'post_title' => 'Magento B2B Solutions', 'post_name' => 'magento-b2b-solutions',
		'post_parent' => $parent_id, 'post_status' => 'publish', 'post_content' => '',
		'comment_status' => 'closed', 'ping_status' => 'closed',
	);
	if ( $page ) {
		if ( (int) $page->post_parent !== $parent_id || 'publish' !== $page->post_status || 'Magento B2B Solutions' !== $page->post_title ) {
			$post['ID'] = (int) $page->ID;
			wp_update_post( $post );
		}
		return;
	}
	wp_insert_post( $post );
}
add_action( 'init', 'ethnic_magento_b2b_ensure_page', 20 );

function ethnic_magento_b2b_is_target() {
	if ( is_admin() ) {
		return false;
	}
	$page = ethnic_magento_b2b_target_page();
	return $page && (int) get_queried_object_id() === (int) $page->ID;
}

function ethnic_magento_b2b_url( $path ) {
	return home_url( '/' . trim( $path, '/' ) . '/' );
}

function ethnic_magento_b2b_contact_url( $intent ) {
	$args = array( 'intent' => $intent, 'service' => 'magento-b2b-solutions' );
	return function_exists( 'ethnic_consultation_route_contact_url' )
		? ethnic_consultation_route_contact_url( $args, ethnic_magento_b2b_url( 'contact-us' ) )
		: add_query_arg( $args, ethnic_magento_b2b_url( 'contact-us' ) );
}

function ethnic_magento_b2b_icon( $name = 'check' ) {
	$paths = array(
		'account' => '<circle cx="12" cy="8" r="3"/><path d="M5 20c.7-4 3-6 7-6s6.3 2 7 6"/><path d="M4 5h3M17 5h3"/>',
		'price' => '<path d="M4 6h10l6 6-8 8-8-8z"/><circle cx="9" cy="10" r="1"/>',
		'flow' => '<rect x="3" y="4" width="7" height="5" rx="1"/><rect x="14" y="15" width="7" height="5" rx="1"/><path d="M10 6.5h5a3 3 0 0 1 3 3V15"/>',
		'link' => '<path d="M9 15l6-6M7.5 17.5l-1 1a3.5 3.5 0 0 1-5-5l4-4a3.5 3.5 0 0 1 5 0M16.5 6.5l1-1a3.5 3.5 0 0 1 5 5l-4 4a3.5 3.5 0 0 1-5 0"/>',
		'cart' => '<path d="M3 4h2l2 11h11l2-7H6"/><circle cx="9" cy="20" r="1.5"/><circle cx="17" cy="20" r="1.5"/>',
		'catalog' => '<rect x="3" y="4" width="8" height="7" rx="1"/><rect x="13" y="4" width="8" height="7" rx="1"/><rect x="3" y="13" width="8" height="7" rx="1"/><rect x="13" y="13" width="8" height="7" rx="1"/>',
		'shield' => '<path d="M12 3l7 3v5c0 4.5-2.7 8-7 10-4.3-2-7-5.5-7-10V6z"/><path d="M9 12l2 2 4-4"/>',
		'data' => '<ellipse cx="12" cy="5" rx="7" ry="3"/><path d="M5 5v7c0 1.7 3.1 3 7 3s7-1.3 7-3V5M5 12v7c0 1.7 3.1 3 7 3s7-1.3 7-3v-7"/>',
		'check' => '<circle cx="12" cy="12" r="9"/><path d="M8 12l3 3 5-6"/>',
	);
	return '<svg viewBox="0 0 24 24" aria-hidden="true" focusable="false">' . ( $paths[ $name ] ?? $paths['check'] ) . '</svg>';
}

function ethnic_magento_b2b_heading( $eyebrow, $title, $copy = '' ) {
	$html  = '<div class="emb-heading"><p class="emb-eyebrow">' . esc_html( $eyebrow ) . '</p><h2>' . esc_html( $title ) . '</h2>';
	$html .= $copy ? '<p class="emb-heading__copy">' . esc_html( $copy ) . '</p>' : '';
	return $html . '</div>';
}

function ethnic_magento_b2b_cards( $items, $class = '' ) {
	$html = '<div class="emb-grid ' . esc_attr( $class ) . '">';
	foreach ( $items as $item ) {
		$html .= '<article class="emb-card"><span class="emb-icon">' . ethnic_magento_b2b_icon( $item[0] ) . '</span><h3>' . esc_html( $item[1] ) . '</h3><p>' . esc_html( $item[2] ) . '</p>';
		if ( ! empty( $item[3] ) ) {
			$html .= '<strong class="emb-value">Business value</strong><p>' . esc_html( $item[3] ) . '</p>';
		}
		$html .= '</article>';
	}
	return $html . '</div>';
}

function ethnic_magento_b2b_render() {
	$consult = ethnic_magento_b2b_contact_url( 'consultation' );
	$proposal = ethnic_magento_b2b_contact_url( 'proposal' );
	$cases = function_exists( 'ethnic_case_studies_archive_url' ) ? ethnic_case_studies_archive_url() : ethnic_magento_b2b_url( 'case-studies' );
	$challenges = array(
		array( 'price', 'Manual customer pricing', 'Spreadsheets and one-off updates make account pricing slow to maintain and difficult to govern.' ),
		array( 'catalog', 'Fragmented catalogs', 'Customer groups, regions, or contracts require different assortments and product visibility.' ),
		array( 'flow', 'Slow quotes and approvals', 'Email-based negotiation and internal sign-off can hide status and delay order placement.' ),
		array( 'cart', 'Cumbersome repeat ordering', 'Consumer-style browsing creates unnecessary steps for buyers who already know their SKUs.' ),
		array( 'data', 'Disconnected operational data', 'Commerce, ERP, CRM, and product systems can disagree on stock, pricing, accounts, and orders.' ),
		array( 'account', 'Sales-assisted order overhead', 'Representatives spend time rekeying routine orders instead of supporting higher-value account needs.' ),
		array( 'shield', 'Limited purchasing controls', 'Account administrators need practical control over permissions, limits, addresses, and approvers.' ),
		array( 'link', 'Low account visibility', 'Buyers and finance teams need a clear view of order history, credit context, quotes, and purchasing activity.' ),
	);
	$capabilities = array(
		array( 'account', 'Company accounts', 'Represent business customers with multiple users, teams, addresses, and account administrators.', 'Give customers self-service control without losing account governance.' ),
		array( 'shield', 'Role-based permissions', 'Define buyer, approver, finance, and administrator rights around real purchasing responsibilities.', 'Keep actions and spending authority aligned with policy.' ),
		array( 'catalog', 'Shared catalogs and pricing', 'Deliver segmented assortments, contract pricing, tiers, and product visibility by account or group.', 'Digitize negotiated commercial terms at storefront level.' ),
		array( 'flow', 'Quotes and approvals', 'Support request-for-quote, negotiation, expiry, internal review, thresholds, and quote-to-order conversion.', 'Replace scattered coordination with a visible workflow.' ),
		array( 'cart', 'Quick order and requisition lists', 'Enable SKU entry, reusable lists, repeat orders, bulk quantities, and CSV-assisted ordering.', 'Help experienced buyers build large orders efficiently.' ),
		array( 'price', 'Credit and payment workflows', 'Accommodate purchase orders, account credit, payment rules, and validation logic where appropriate.', 'Match checkout to established customer relationships.' ),
		array( 'account', 'Sales representative support', 'Give internal teams useful account, quote, cart, and order context for assisted selling.', 'Connect digital self-service with the sales organization.' ),
		array( 'data', 'Account-level order history', 'Present relevant order, quote, and reorder information across authorized company users.', 'Improve purchasing continuity and account visibility.' ),
	);
	$faqs = array(
		array( 'What Magento B2B capabilities can you implement?', 'We can plan, build, and customize company accounts, roles, shared catalogs, customer pricing, quotes, approvals, quick order, requisition lists, credit workflows, integrations, and account reporting.' ),
		array( 'Do you work with both Magento Open Source and Adobe Commerce?', 'Yes. The suitable edition and implementation approach depend on required capabilities, existing licenses, custom functionality, scale, and the wider commerce architecture.' ),
		array( 'Can you build customer-specific catalogs and pricing?', 'Yes. We can implement segmented product access, customer-group or contract pricing, volume rules, minimum quantities, and account-specific catalog logic aligned with source systems.' ),
		array( 'Can Magento support company accounts with multiple buyers and approvers?', 'Yes. Account structures can include administrators, buyers, approvers, finance users, departments, branches, permissions, and purchasing limits.' ),
		array( 'Do you implement quote and approval workflows?', 'Yes. We can configure or develop quote requests, negotiation, expiry, approval thresholds, purchase-order handling, and quote-to-order flows around documented business rules.' ),
		array( 'Can you integrate Magento B2B with our ERP, CRM, or PIM?', 'Yes. We design API, scheduled, event-driven, or hybrid integrations for customer, catalog, price, inventory, quote, and order data, including monitoring and recovery paths.' ),
		array( 'Can you modernize an existing Magento B2B store?', 'Yes. Modernization may include architecture review, UX improvements, extension replacement, workflow refactoring, performance work, upgrades, integration changes, and phased feature delivery.' ),
		array( 'Do you support hybrid B2B and B2C commerce models?', 'Yes. Magento can support shared platform foundations with distinct catalogs, pricing, journeys, and rules for consumer and business audiences when the architecture is planned carefully.' ),
		array( 'How do you test complex B2B workflows before launch?', 'We map roles and scenarios, test integrations and business rules, validate permissions and data behavior, run regression and performance checks, and support structured user acceptance testing.' ),
		array( 'Do you provide ongoing support after implementation?', 'Yes. Ongoing engagements can cover monitoring, maintenance, upgrades, incident response, optimization, documentation, and planned feature delivery.' ),
	);

	ob_start();
	?>
	<main class="emb-page">
		<section class="emb-hero"><div class="emb-shell emb-hero__grid">
			<div><p class="emb-eyebrow">Enterprise B2B Commerce</p><h1>Magento B2B Solutions</h1><p class="emb-hero__lead">Build a scalable B2B commerce platform for wholesalers, distributors, manufacturers, and enterprise merchants—with account-based buying, commercial rules, operational workflows, and connected business data.</p>
				<div class="emb-actions"><a class="emb-button emb-button--primary" href="<?php echo esc_url( $consult ); ?>">Book a Free Consultation</a><a class="emb-button emb-button--secondary" href="<?php echo esc_url( $cases ); ?>">View Magento Case Studies</a></div>
				<ul class="emb-ticks"><li>Company accounts and role-based purchasing</li><li>Custom pricing, catalogs, quotes, and approvals</li><li>ERP, CRM, PIM, and operational integrations</li></ul>
			</div>
			<div class="emb-hero-map" aria-label="B2B account and systems architecture illustration"><div class="emb-platform"><small>Commerce core</small><strong>Magento / Adobe Commerce</strong></div><div class="emb-map-node emb-map-node--company"><small>Parent account</small><strong>Company</strong></div><div class="emb-map-node emb-map-node--buyers"><small>People &amp; teams</small><strong>Buyers · Approvers · Finance</strong></div><div class="emb-map-node emb-map-node--flow"><small>Purchasing controls</small><strong>Quote → Approval → Order</strong></div><div class="emb-map-node emb-map-node--systems"><small>Business systems</small><strong>ERP · CRM · PIM</strong></div></div>
		</div></section>

		<section class="emb-trust"><div class="emb-shell"><div class="emb-trust__grid"><span>Magento Open Source &amp; Adobe Commerce</span><span>B2B and B2C commerce delivery</span><span>Complex catalogs and pricing</span><span>Custom workflows and integrations</span><span>Long-term Magento support</span></div></div></section>

		<section class="emb-section"><div class="emb-shell">
			<?php echo ethnic_magento_b2b_heading( 'Magento B2B Development', 'Account-based commerce designed around how your business sells.', 'Magento and Adobe Commerce can support purchasing journeys that look very different from consumer checkout—from negotiated terms and restricted catalogs to multi-user accounts and internal approvals.' ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
			<div class="emb-prose"><p>We translate sales and operational processes into usable digital buying experiences. The work can include a new Magento B2B build, platform modernization, feature expansion, integration delivery, or targeted workflow improvements.</p><p>Each solution is planned around business usability, scalability, maintainability, and operational fit. The goal is a platform that serves buyers well while giving sales, finance, operations, and technology teams the controls they need.</p></div>
			<?php echo ethnic_magento_b2b_cards( array( array( 'account','Account-Based Commerce','Structure digital buying around companies, users, branches, roles, and relationships.' ), array( 'price','Flexible Pricing and Catalogs','Apply differentiated assortments and commercial rules to authorized customer groups.' ), array( 'flow','Workflow Automation','Move quotes, approvals, and repeat purchasing into visible, governed processes.' ), array( 'link','Integration-Ready Architecture','Connect commerce with the systems responsible for customer, product, stock, and order data.' ) ), 'emb-grid--four' ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
		</div></section>

		<section class="emb-section emb-section--soft"><div class="emb-shell"><?php echo ethnic_magento_b2b_heading( 'Operational Friction', 'Common B2B Commerce Challenges', 'Recognizable issues often point to a need for better account logic, workflow design, self-service tools, or systems integration.' ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?><?php echo ethnic_magento_b2b_cards( $challenges, 'emb-grid--four emb-grid--compact' ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></div></section>

		<section class="emb-section" id="capabilities"><div class="emb-shell"><?php echo ethnic_magento_b2b_heading( 'Platform Capability', 'Core Magento B2B capabilities we implement and customize.', 'Combine native Adobe Commerce B2B functionality, Magento configuration, and maintainable custom development according to the operating model.' ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?><?php echo ethnic_magento_b2b_cards( $capabilities, 'emb-grid--mixed' ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></div></section>

		<section class="emb-section emb-section--dark" id="company-accounts"><div class="emb-shell emb-split"><div><?php echo ethnic_magento_b2b_heading( 'Company Accounts & Roles', 'Model buyers, approvers, teams, and locations with practical controls.', 'A business customer may need one company account spanning several users, departments, branches, addresses, and areas of purchasing authority.' ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?><p>Role-based access can define who creates orders, who approves spend, which locations users can access, and where purchasing limits apply. This improves governance while reducing manual coordination between the customer and sales team.</p><ul class="emb-chip-list"><li>Parent and child structures</li><li>Multiple account users</li><li>Buyer and approver rights</li><li>Purchasing limits</li><li>Branch-based access</li><li>Shared account data</li></ul></div>
			<div class="emb-hierarchy" aria-label="Company account hierarchy"><div class="emb-hierarchy__root">Company Account</div><div class="emb-hierarchy__line"></div><div class="emb-hierarchy__roles"><span>Administrator</span><span>Buyer</span><span>Approver</span><span>Finance / Accounts</span></div><div class="emb-hierarchy__branches"><div><strong>Branch A</strong><small>Buyers · Address · Limit</small></div><div><strong>Department B</strong><small>Approver · Catalog · Budget</small></div></div></div>
		</div></section>

		<section class="emb-section" id="catalog-pricing"><div class="emb-shell emb-split"><div><?php echo ethnic_magento_b2b_heading( 'Catalog & Pricing', 'Present the right products and commercial terms to each account.', 'Different customers may require unique product access, contract rates, volume discounts, tier pricing, minimum quantities, or regional assortments.' ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?><p>We align segmented Magento catalog experiences with the ERP, sales, and account-management processes that govern the commercial relationship.</p><ul class="emb-ticks emb-ticks--dark"><li>Shared and account-specific catalogs</li><li>Contract, group, tier, and volume pricing</li><li>Restricted products and minimum quantities</li><li>Regional or account-level assortment rules</li></ul></div><div class="emb-catalog-compare"><article><span>Customer A</span><h3>Catalog A</h3><p>Approved industrial range</p><strong>Pricing A</strong><small>Contract terms · Volume tiers</small></article><article><span>Customer B</span><h3>Catalog B</h3><p>Regional distributor range</p><strong>Pricing B</strong><small>Account rates · MOQ rules</small></article></div></div></section>

		<section class="emb-section emb-section--soft" id="quote-workflow"><div class="emb-shell"><?php echo ethnic_magento_b2b_heading( 'Quotes & Approvals', 'Turn a complex purchasing process into a visible digital workflow.', 'B2B buyers may need to request a quote, negotiate terms, obtain internal approval, and convert the accepted quote into an order. The workflow should reduce email coordination while preserving necessary business controls.' ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?><div class="emb-workflow"><?php foreach ( array( 'Buyer builds cart', 'Quote requested', 'Seller reviews pricing', 'Approver reviews', 'Quote accepted', 'Order & systems sync' ) as $i => $step ) : ?><div><span><?php echo esc_html( $i + 1 ); ?></span><strong><?php echo esc_html( $step ); ?></strong></div><?php endforeach; ?></div><div class="emb-feature-row"><span>Quote negotiation</span><span>Quote expiry</span><span>Approval thresholds</span><span>Purchase orders</span><span>Sales involvement</span><span>Quote-to-order conversion</span></div></div></section>

		<section class="emb-section" id="quick-order"><div class="emb-shell emb-split"><div><?php echo ethnic_magento_b2b_heading( 'High-Volume Purchasing', 'A quick-order experience for buyers who already know what they need.', 'Repeat B2B buyers should not have to navigate a consumer-style browsing journey for every purchase. SKU entry, bulk quantities, saved lists, and repeat-order tools can make routine purchasing more direct.' ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?><ul class="emb-ticks emb-ticks--dark"><li>SKU-based quick order and bulk quantity entry</li><li>CSV upload and saved requisition lists</li><li>Repeat orders and frequently purchased items</li><li>Multi-address workflows where relevant</li></ul></div><div class="emb-quick"><div class="emb-quick__head"><strong>Quick order</strong><span>3 line items</span></div><div class="emb-quick__row emb-quick__labels"><span>SKU</span><span>Product</span><span>Qty</span></div><div class="emb-quick__row"><code>IND-2048</code><span>Industrial valve</span><b>24</b></div><div class="emb-quick__row"><code>FLT-4410</code><span>Filter assembly</span><b>60</b></div><div class="emb-quick__row"><code>GSK-0082</code><span>Gasket kit</span><b>120</b></div><div class="emb-quick__foot"><button type="button" disabled>Upload CSV</button><button type="button" disabled>Add to cart</button></div></div></div></section>

		<section class="emb-section emb-section--dark" id="integrations"><div class="emb-shell emb-split"><div><?php echo ethnic_magento_b2b_heading( 'Connected Commerce', 'ERP, CRM, and PIM integrations built for operational consistency.', 'Accurate B2B pricing, inventory, account, product, and order information often depends on several business systems working together.' ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?><p>We design real-time, scheduled, event-driven, or hybrid synchronization based on data ownership and business needs. Monitoring, error handling, retry mechanisms, and integration visibility are considered part of the operating design—not an afterthought.</p></div><div class="emb-architecture"><div class="emb-architecture__core"><small>Commerce</small><strong>Magento / Adobe Commerce</strong></div><?php foreach ( array( 'ERP','CRM','PIM','WMS','Payments','Shipping','Analytics' ) as $system ) : ?><span><?php echo esc_html( $system ); ?></span><?php endforeach; ?><p>APIs · Events · Queues · Scheduled sync</p></div></div></section>

		<section class="emb-section" id="process"><div class="emb-shell"><?php echo ethnic_magento_b2b_heading( 'Delivery Approach', 'A structured Magento B2B implementation process.', 'The process connects business discovery, solution design, implementation, testing, and ongoing platform ownership.' ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?><div class="emb-process"><?php $steps = array( array('Business Process Discovery','Requirements and workflow summary'), array('Account and Role Mapping','Role and permission model'), array('Catalog and Pricing Planning','Commercial rules definition'), array('Workflow and Integration Design','Solution architecture and integration plan'), array('UX and Technical Implementation','Working experience and platform features'), array('Data and Integration Testing','Validated data flows and recovery paths'), array('User Acceptance Testing','QA and launch checklist'), array('Launch and Ongoing Support','Release plan and improvement roadmap') ); foreach ( $steps as $i => $step ) : ?><article><span><?php echo esc_html( sprintf( '%02d', $i + 1 ) ); ?></span><div><h3><?php echo esc_html( $step[0] ); ?></h3><p><?php echo esc_html( $step[1] ); ?></p></div></article><?php endforeach; ?></div></div></section>

		<section class="emb-section emb-section--soft"><div class="emb-shell"><?php echo ethnic_magento_b2b_heading( 'Commerce Models', 'B2B commerce adds account and workflow complexity beyond standard B2C.', 'Some organizations need both models on one platform, with shared foundations and deliberately different buying experiences.' ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?><div class="emb-comparison"><article><h3>B2C commerce</h3><ul><li>Individual shoppers</li><li>Public pricing</li><li>Standard catalog</li><li>Simple checkout</li><li>Smaller orders</li><li>Individual decisions</li></ul></article><article class="emb-comparison__focus"><h3>B2B commerce</h3><ul><li>Company accounts and multiple users</li><li>Contract or customer pricing</li><li>Shared or restricted catalogs</li><li>Quotes, approvals, credit, or POs</li><li>Bulk and repeat ordering</li><li>Multi-role purchasing workflows</li></ul></article></div></div></section>

		<section class="emb-section"><div class="emb-shell"><?php echo ethnic_magento_b2b_heading( 'Technology', 'A relevant stack selected for the commerce architecture.', 'Not every project needs every technology. The stack depends on platform edition, scale, integrations, hosting, buyer experience, and operational requirements.' ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?><div class="emb-tech"><?php foreach ( array( 'Magento Open Source','Adobe Commerce','Adobe Commerce B2B','PHP','MySQL','Redis','Varnish','OpenSearch','GraphQL','REST APIs','RabbitMQ','Docker','AWS','Cloudflare','Hyvä','Headless frontends' ) as $tech ) : ?><span><?php echo esc_html( $tech ); ?></span><?php endforeach; ?></div></div></section>

		<section class="emb-section emb-section--dark"><div class="emb-shell"><?php echo ethnic_magento_b2b_heading( 'Ways to Work Together', 'Engagement models shaped around scope and roadmap.', 'Choose a delivery structure that matches project certainty, technical ownership, and the pace of change.' ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?><?php echo ethnic_magento_b2b_cards( array( array('check','Fixed-Scope B2B Implementation','For clearly defined builds, modules, or workflow projects.'), array('flow','Phased B2B Modernization','For improving accounts, catalogs, integrations, and workflows over planned stages.'), array('account','Dedicated Magento Team','For larger roadmaps that need ongoing development capacity and product continuity.'), array('shield','Support and Optimization Retainer','For maintenance, monitoring, continuous improvements, and planned feature delivery.') ), 'emb-grid--four' ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></div></section>

		<section class="emb-section" id="case-studies"><div class="emb-shell"><?php echo ethnic_magento_b2b_heading( 'Selected Work', 'Relevant Magento and commerce case studies.', 'Explore delivery examples from our commerce portfolio. We only present published project information and do not manufacture performance claims.' ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?><?php if ( function_exists( 'ethnic_case_studies_service_page_cards' ) && function_exists( 'ethnic_shared_case_study_showcase_render' ) ) { $items = ethnic_case_studies_service_page_cards( array( 'page_id' => get_queried_object_id(), 'limit' => 3, 'filters' => array( 'service' => array('ecommerce-development'), 'platform' => array('magento','adobe-commerce'), 'category' => array('magento') ), 'fallback_items' => array() ) ); if ( $items ) { echo ethnic_shared_case_study_showcase_render( $items, array( 'carousel_label' => 'Magento B2B case studies' ) ); /* phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped */ } else { ?><div class="emb-empty"><p>Browse our published work for relevant commerce delivery examples.</p><a class="emb-text-link" href="<?php echo esc_url( $cases ); ?>">View Case Studies →</a></div><?php } } else { ?><div class="emb-empty"><p>Browse our published work for relevant commerce delivery examples.</p><a class="emb-text-link" href="<?php echo esc_url( $cases ); ?>">View Case Studies →</a></div><?php } ?></div></section>

		<section class="emb-section emb-section--soft"><div class="emb-shell emb-split"><div><?php echo ethnic_magento_b2b_heading( 'Why Ethnic?', 'Technical delivery grounded in B2B operations.', 'We combine Magento-focused implementation with structured planning for the people, rules, data, and systems behind the storefront.' ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></div><ul class="emb-reasons"><li>Magento-focused technical capability</li><li>Understanding of complex B2B workflows</li><li>Business-first solution planning</li><li>Custom development and integration experience</li><li>Structured QA and deployment</li><li>Support for existing Magento codebases</li><li>Clear communication and documentation</li><li>Long-term support availability</li></ul></div></section>

		<section class="emb-section"><div class="emb-shell"><?php echo ethnic_magento_b2b_heading( 'Related Expertise', 'Related Magento services.', 'Extend the B2B roadmap with focused strategy, platform, integration, and support capabilities.' ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?><div class="emb-related"><a href="<?php echo esc_url( ethnic_magento_b2b_url('services/ecommerce-development/magento-development') ); ?>"><h3>Magento Development</h3><p>Explore the broader Magento engineering service.</p><span>Explore Service →</span></a><a href="<?php echo esc_url( ethnic_magento_b2b_url('services/ecommerce-development/adobe-commerce-development') ); ?>"><h3>Adobe Commerce Development</h3><p>Plan and deliver enterprise Adobe Commerce capabilities.</p><span>Explore Service →</span></a><a href="<?php echo esc_url( ethnic_magento_b2b_url('services/ecommerce-development/magento-development') . '#integrations' ); ?>"><h3>Magento Integrations</h3><p>Connect commerce with operational systems and data.</p><span>Explore Service →</span></a><a href="<?php echo esc_url( ethnic_magento_b2b_url('services/ecommerce-development/magento-development') . '#migration-maintenance' ); ?>"><h3>Magento Support Services</h3><p>Maintain, improve, and extend an existing platform.</p><span>Explore Service →</span></a></div></div></section>

		<section class="emb-section emb-section--soft" id="faqs"><div class="emb-shell emb-faq-layout"><div><?php echo ethnic_magento_b2b_heading( 'Frequently Asked Questions', 'Magento B2B solutions FAQs.', 'Direct answers for teams evaluating Magento or Adobe Commerce B2B development.' ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></div><div class="emb-faqs"><?php foreach ( $faqs as $i => $faq ) : ?><details <?php echo 0 === $i ? 'open' : ''; ?>><summary><?php echo esc_html( $faq[0] ); ?></summary><p><?php echo esc_html( $faq[1] ); ?></p></details><?php endforeach; ?></div></div></section>

		<section class="emb-final"><div class="emb-shell"><div class="emb-final__panel"><p class="emb-eyebrow">Start the Conversation</p><h2>Planning a Magento B2B Commerce Project?</h2><p>Discuss company accounts, shared catalogs, custom pricing, quotes, approvals, bulk ordering, integrations, or broader Adobe Commerce B2B requirements with our team.</p><div class="emb-actions"><a class="emb-button emb-button--light" href="<?php echo esc_url( $consult ); ?>">Talk to a Magento Expert</a><a class="emb-button emb-button--outline" href="<?php echo esc_url( $proposal ); ?>">Request a Proposal</a></div></div></div></section>
	</main>
	<?php
	return ob_get_clean();
}

function ethnic_magento_b2b_styles() {
	return <<<'CSS'
body.ethnic-magento-b2b-target .emb-hero h1{color:#fff!important;-webkit-text-fill-color:#fff!important;background:none!important}
body.ethnic-magento-b2b-target .emb-section--dark h2,
body.ethnic-magento-b2b-target .emb-section--dark h3,
body.ethnic-magento-b2b-target .emb-final h2{color:#fff!important;-webkit-text-fill-color:#fff!important;background:none!important}
body.ethnic-magento-b2b-target #page-title.page-title-block.custom-page-title{display:none}.ethnic-magento-b2b-target .block-content{padding:0!important}.emb-page{--ink:#151b27;--muted:#626b7a;--soft:#f6f7fa;--line:#e1e4ea;--accent:#f26322;--accent2:#7b3ff2;color:var(--ink);font-family:inherit;overflow:hidden}.emb-page *{box-sizing:border-box}.emb-shell{width:min(1180px,calc(100% - 40px));margin:0 auto}.emb-section{padding:104px 0}.emb-section--soft{background:var(--soft)}.emb-section--dark{background:#141927;color:#fff}.emb-eyebrow,.emb-heading .emb-eyebrow{text-transform:uppercase;letter-spacing:.16em;font-size:12px;font-weight:800;color:var(--accent);margin:0 0 16px}.emb-heading{max-width:780px;margin-bottom:38px}.emb-heading h2,.emb-final h2{font-size:clamp(34px,4vw,54px);line-height:1.08;letter-spacing:-.035em;margin:0 0 18px;color:inherit}.emb-heading__copy,.emb-hero__lead{font-size:18px;line-height:1.7;color:var(--muted);margin:0}.emb-section--dark .emb-heading__copy,.emb-section--dark p{color:#b9c1d1}.emb-prose{max-width:880px;display:grid;grid-template-columns:1fr 1fr;gap:28px;margin:0 0 42px}.emb-prose p,.emb-split>div>p{font-size:17px;line-height:1.75;color:var(--muted);margin:0}.emb-hero{background:linear-gradient(135deg,#121723 0%,#1b1830 60%,#271649 100%);color:#fff;padding:112px 0 96px}.emb-hero__grid{display:grid;grid-template-columns:1.02fr .98fr;gap:72px;align-items:center}.emb-hero h1{font-size:clamp(48px,6vw,78px);line-height:.98;letter-spacing:-.05em;margin:0 0 25px;color:#fff}.emb-hero__lead{color:#c9cfda;max-width:680px}.emb-actions{display:flex;flex-wrap:wrap;gap:13px;margin:30px 0}.emb-button{display:inline-flex;align-items:center;justify-content:center;min-height:52px;padding:0 24px;border-radius:9px;font-weight:800;text-decoration:none!important;transition:.2s}.emb-button--primary{background:var(--accent);color:#fff!important}.emb-button--secondary{color:#fff!important;border:1px solid #656b78;background:#ffffff0a}.emb-button:hover{transform:translateY(-2px)}.emb-ticks{list-style:none;padding:0;margin:25px 0 0;display:grid;gap:12px}.emb-ticks li{position:relative;padding-left:27px;color:#d8dce5}.emb-ticks li:before{content:'✓';position:absolute;left:0;color:#ff8b57;font-weight:900}.emb-ticks--dark li{color:var(--ink)}.emb-hero-map{min-height:510px;position:relative;border:1px solid #ffffff26;border-radius:28px;background:linear-gradient(145deg,#ffffff0f,#ffffff05);box-shadow:0 30px 80px #0007}.emb-platform,.emb-map-node{position:absolute;border:1px solid #ffffff24;background:#202637;border-radius:15px;padding:17px 19px;box-shadow:0 14px 35px #0004}.emb-platform{inset:190px 90px auto;text-align:center;border-color:#f2632280;background:linear-gradient(135deg,#372332,#2d2140)}.emb-platform strong,.emb-map-node strong{display:block;color:#fff;margin-top:5px}.emb-platform small,.emb-map-node small{color:#aeb6c7}.emb-map-node:after{content:'';position:absolute;background:#8f78bf66}.emb-map-node--company{top:40px;left:45px}.emb-map-node--buyers{top:40px;right:38px}.emb-map-node--flow{bottom:40px;left:45px}.emb-map-node--systems{bottom:40px;right:38px}.emb-map-node--company:after,.emb-map-node--buyers:after{width:2px;height:78px;top:100%;left:50%}.emb-map-node--flow:after,.emb-map-node--systems:after{width:2px;height:78px;bottom:100%;left:50%}.emb-trust{border-bottom:1px solid var(--line);background:#fff}.emb-trust__grid{display:grid;grid-template-columns:repeat(5,1fr);gap:10px;align-items:center;min-height:88px}.emb-trust span{text-align:center;font-size:13px;font-weight:800;color:#4a5261;padding:0 14px;border-right:1px solid var(--line)}.emb-trust span:last-child{border:0}.emb-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:22px}.emb-grid--four{grid-template-columns:repeat(4,1fr)}.emb-grid--mixed{grid-template-columns:repeat(6,1fr)}.emb-grid--mixed .emb-card{grid-column:span 2}.emb-grid--mixed .emb-card:nth-child(-n+2){grid-column:span 3}.emb-card{background:#fff;border:1px solid var(--line);border-radius:16px;padding:28px;box-shadow:0 9px 30px #20263b0a}.emb-section--dark .emb-card{background:#ffffff08;border-color:#ffffff18}.emb-icon{display:grid;place-items:center;width:46px;height:46px;border-radius:13px;background:#f2632212;color:var(--accent);margin-bottom:21px}.emb-icon svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}.emb-card h3{font-size:20px;line-height:1.25;margin:0 0 10px;color:inherit}.emb-card p{margin:0;color:var(--muted);line-height:1.65}.emb-section--dark .emb-card p{color:#b9c1d1}.emb-value{display:block;margin-top:20px;font-size:11px;letter-spacing:.11em;text-transform:uppercase;color:var(--accent)}.emb-grid--compact .emb-card{padding:24px}.emb-grid--compact .emb-card h3{font-size:18px}.emb-split{display:grid;grid-template-columns:1fr 1fr;gap:80px;align-items:center}.emb-chip-list,.emb-feature-row,.emb-tech{list-style:none;padding:0;display:flex;flex-wrap:wrap;gap:10px;margin:30px 0 0}.emb-chip-list li,.emb-feature-row span,.emb-tech span{padding:10px 14px;border-radius:999px;background:#ffffff0d;border:1px solid #ffffff1c;color:#dfe3eb;font-size:13px}.emb-hierarchy{padding:36px;border-radius:24px;background:#fff;color:var(--ink);text-align:center}.emb-hierarchy__root{display:inline-block;padding:14px 22px;border-radius:10px;background:#f26322;color:#fff;font-weight:800}.emb-hierarchy__line{height:32px;width:2px;background:#d4d7df;margin:auto}.emb-hierarchy__roles{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}.emb-hierarchy__roles span{padding:12px 7px;border:1px solid var(--line);border-radius:8px;font-size:12px;font-weight:700}.emb-hierarchy__branches{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin-top:28px}.emb-hierarchy__branches div{border-radius:12px;background:var(--soft);padding:18px}.emb-hierarchy__branches small,.emb-hierarchy__branches strong{display:block}.emb-hierarchy__branches small{color:var(--muted);margin-top:5px}.emb-catalog-compare{display:grid;grid-template-columns:1fr 1fr;gap:18px;padding:22px;background:var(--soft);border-radius:22px}.emb-catalog-compare article{padding:28px;background:#fff;border:1px solid var(--line);border-radius:15px}.emb-catalog-compare span{font-size:12px;text-transform:uppercase;letter-spacing:.12em;color:var(--accent);font-weight:800}.emb-catalog-compare h3{font-size:25px;margin:16px 0 8px}.emb-catalog-compare p{min-height:50px;color:var(--muted)}.emb-catalog-compare strong,.emb-catalog-compare small{display:block}.emb-catalog-compare small{margin-top:7px;color:var(--muted)}.emb-workflow{display:grid;grid-template-columns:repeat(6,1fr);gap:0;margin-top:50px}.emb-workflow div{position:relative;text-align:center;padding:0 8px}.emb-workflow div:not(:last-child):after{content:'→';position:absolute;right:-8px;top:14px;color:var(--accent);font-size:20px}.emb-workflow span{display:grid;place-items:center;width:48px;height:48px;border:1px solid #f2632260;background:#fff5f0;border-radius:50%;margin:0 auto 14px;color:var(--accent);font-weight:900}.emb-workflow strong{font-size:14px}.emb-feature-row{justify-content:center}.emb-feature-row span,.emb-tech span{background:#fff;border-color:var(--line);color:#4b5362}.emb-quick{border-radius:20px;border:1px solid var(--line);background:#fff;box-shadow:0 20px 50px #20263b12;overflow:hidden}.emb-quick__head,.emb-quick__row,.emb-quick__foot{display:grid;grid-template-columns:1fr 1.7fr .4fr;gap:16px;align-items:center;padding:17px 22px;border-bottom:1px solid var(--line)}.emb-quick__head{grid-template-columns:1fr 1fr;background:#181e2c;color:#fff}.emb-quick__head span{text-align:right;color:#b9c1d1}.emb-quick__labels{font-size:11px;text-transform:uppercase;letter-spacing:.1em;color:var(--muted);background:var(--soft)}.emb-quick__row code{color:var(--accent)}.emb-quick__foot{display:flex;justify-content:flex-end;border:0}.emb-quick button{border:0;border-radius:7px;padding:10px 16px;color:#fff;background:#303748}.emb-quick button:last-child{background:var(--accent)}.emb-architecture{position:relative;min-height:430px;border-radius:24px;border:1px solid #ffffff1c}.emb-architecture__core{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:210px;text-align:center;padding:24px 14px;border:1px solid #f2632280;border-radius:15px;background:#312132}.emb-architecture__core small,.emb-architecture__core strong{display:block}.emb-architecture__core small{color:#b9c1d1}.emb-architecture span{position:absolute;display:grid;place-items:center;width:90px;height:48px;border-radius:10px;background:#ffffff0b;border:1px solid #ffffff20;font-weight:700}.emb-architecture span:nth-of-type(1){top:30px;left:45px}.emb-architecture span:nth-of-type(2){top:30px;right:45px}.emb-architecture span:nth-of-type(3){top:150px;left:20px}.emb-architecture span:nth-of-type(4){top:150px;right:20px}.emb-architecture span:nth-of-type(5){bottom:65px;left:45px}.emb-architecture span:nth-of-type(6){bottom:65px;right:45px}.emb-architecture span:nth-of-type(7){bottom:22px;left:50%;transform:translateX(-50%)}.emb-architecture>p{position:absolute;top:13px;left:50%;transform:translateX(-50%);font-size:11px;white-space:nowrap}.emb-process{display:grid;grid-template-columns:1fr 1fr;border-top:1px solid var(--line);border-left:1px solid var(--line)}.emb-process article{display:grid;grid-template-columns:54px 1fr;gap:18px;padding:28px;border-right:1px solid var(--line);border-bottom:1px solid var(--line)}.emb-process article>span{font-size:13px;color:var(--accent);font-weight:900}.emb-process h3{font-size:19px;margin:0 0 6px}.emb-process p{margin:0;color:var(--muted)}.emb-comparison{display:grid;grid-template-columns:1fr 1fr;gap:20px}.emb-comparison article{background:#fff;border:1px solid var(--line);border-radius:18px;padding:34px}.emb-comparison__focus{border-top:4px solid var(--accent)!important}.emb-comparison h3{font-size:25px;margin:0 0 20px}.emb-comparison ul{list-style:none;padding:0;margin:0;display:grid;gap:0}.emb-comparison li{padding:15px 0;border-bottom:1px solid var(--line)}.emb-comparison li:last-child{border:0}.emb-comparison__focus li:before{content:'✓';color:var(--accent);margin-right:10px}.emb-tech{margin-top:30px}.emb-tech span{padding:12px 17px;font-weight:700}.emb-empty{border:1px solid var(--line);border-radius:16px;padding:32px}.emb-empty p{margin-top:0}.emb-text-link{font-weight:800;color:var(--accent)!important;text-decoration:none!important}.emb-reasons{list-style:none;padding:0;margin:0;display:grid;grid-template-columns:1fr 1fr;gap:12px}.emb-reasons li{padding:16px 18px 16px 46px;position:relative;background:#fff;border:1px solid var(--line);border-radius:10px;font-weight:700}.emb-reasons li:before{content:'✓';position:absolute;left:18px;color:var(--accent)}.emb-related{display:grid;grid-template-columns:repeat(4,1fr);gap:18px}.emb-related a{display:block;padding:27px;border:1px solid var(--line);border-radius:15px;text-decoration:none!important;color:var(--ink)!important}.emb-related h3{font-size:20px;margin:0 0 12px}.emb-related p{color:var(--muted);line-height:1.6;min-height:75px}.emb-related span{font-weight:800;color:var(--accent)}.emb-faq-layout{display:grid;grid-template-columns:.75fr 1.25fr;gap:70px;align-items:start}.emb-faqs details{background:#fff;border:1px solid var(--line);border-radius:11px;margin-bottom:12px}.emb-faqs summary{padding:20px 50px 20px 22px;font-weight:800;cursor:pointer;position:relative;list-style:none}.emb-faqs summary:after{content:'+';position:absolute;right:22px;font-size:23px;top:14px;color:var(--accent)}.emb-faqs details[open] summary:after{content:'–'}.emb-faqs details p{padding:0 22px 21px;margin:0;color:var(--muted);line-height:1.7}.emb-final{padding:80px 0}.emb-final__panel{padding:70px;border-radius:26px;background:linear-gradient(135deg,#f26322,#813cce);color:#fff}.emb-final__panel>p:not(.emb-eyebrow){max-width:760px;font-size:18px;line-height:1.7;color:#fff}.emb-final .emb-eyebrow{color:#fff}.emb-button--light{background:#fff;color:#3c254d!important}.emb-button--outline{border:1px solid #ffffffa0;color:#fff!important}.emb-final .emb-actions{margin-bottom:0}
@media(max-width:1024px){.emb-hero__grid,.emb-split,.emb-faq-layout{grid-template-columns:1fr;gap:48px}.emb-grid--four,.emb-related{grid-template-columns:repeat(2,1fr)}.emb-trust__grid{grid-template-columns:repeat(3,1fr);padding:18px 0}.emb-trust span{min-height:42px;display:grid;place-items:center}.emb-hero-map{max-width:650px;width:100%}.emb-architecture{max-width:600px}.emb-grid--mixed{grid-template-columns:repeat(2,1fr)}.emb-grid--mixed .emb-card,.emb-grid--mixed .emb-card:nth-child(-n+2){grid-column:span 1}}
@media(max-width:767px){.emb-shell{width:min(100% - 28px,1180px)}.emb-section{padding:72px 0}.emb-hero{padding:75px 0 65px}.emb-hero h1{font-size:47px}.emb-heading h2,.emb-final h2{font-size:36px}.emb-prose,.emb-grid,.emb-grid--four,.emb-grid--mixed,.emb-related,.emb-process,.emb-comparison,.emb-catalog-compare{grid-template-columns:1fr}.emb-trust__grid{grid-template-columns:1fr 1fr}.emb-trust span{border:0}.emb-hero-map{min-height:470px}.emb-platform{inset:190px 28px auto}.emb-map-node{max-width:150px;padding:13px}.emb-map-node--company,.emb-map-node--flow{left:15px}.emb-map-node--buyers,.emb-map-node--systems{right:15px}.emb-workflow{grid-template-columns:1fr 1fr;gap:25px}.emb-workflow div:not(:last-child):after{display:none}.emb-feature-row{justify-content:flex-start}.emb-hierarchy{padding:22px 14px}.emb-hierarchy__roles{grid-template-columns:1fr 1fr}.emb-architecture span{width:74px;font-size:12px}.emb-architecture__core{width:170px}.emb-reasons{grid-template-columns:1fr}.emb-final__panel{padding:42px 25px}.emb-actions{flex-direction:column;align-items:stretch}.emb-button{width:100%}.emb-quick__row{grid-template-columns:1fr 1.3fr .35fr;padding:14px 13px;font-size:13px}}
CSS;
}

function ethnic_magento_b2b_head() {
	if ( ! ethnic_magento_b2b_is_target() ) {
		return;
	}
	$home = home_url( '/' );
	$crumbs = array(
		array( 'Home', $home ), array( 'Services', ethnic_magento_b2b_url('services') ), array( 'eCommerce Development', ethnic_magento_b2b_url('services/ecommerce-development') ),
		array( 'Magento Development', ethnic_magento_b2b_url('services/ecommerce-development/magento-development') ), array( 'Magento B2B Solutions', get_permalink() ),
	);
	$faq_data = array(
		array( 'What Magento B2B capabilities can you implement?', 'Company accounts, permissions, catalogs, pricing, quotes, approvals, quick order, credit workflows, integrations, and account reporting.' ),
		array( 'Do you work with both Magento Open Source and Adobe Commerce?', 'Yes. The suitable edition depends on required capabilities, existing licenses, custom functionality, scale, and architecture.' ),
		array( 'Can you build customer-specific catalogs and pricing?', 'Yes. We can implement segmented product access, customer-group or contract pricing, volume rules, minimum quantities, and account-specific catalog logic.' ),
		array( 'Can Magento support company accounts with multiple buyers and approvers?', 'Yes. Account structures can include administrators, buyers, approvers, finance users, departments, branches, permissions, and purchasing limits.' ),
		array( 'Do you implement quote and approval workflows?', 'Yes. We can configure or develop quote requests, negotiation, expiry, approval thresholds, purchase-order handling, and quote-to-order flows.' ),
		array( 'Can you integrate Magento B2B with our ERP, CRM, or PIM?', 'Yes. We design API, scheduled, event-driven, or hybrid integrations with monitoring and recovery paths.' ),
		array( 'Can you modernize an existing Magento B2B store?', 'Yes. Modernization can include architecture review, UX improvements, workflow refactoring, performance work, upgrades, integration changes, and phased feature delivery.' ),
		array( 'Do you support hybrid B2B and B2C commerce models?', 'Yes. Magento can support shared platform foundations with distinct catalogs, pricing, journeys, and rules for consumer and business audiences.' ),
		array( 'How do you test complex B2B workflows before launch?', 'We map roles and scenarios, test integrations and business rules, validate permissions and data behavior, and support structured user acceptance testing.' ),
		array( 'Do you provide ongoing support after implementation?', 'Yes. Support can cover maintenance, monitoring, upgrades, optimization, and feature delivery.' ),
	);
	$breadcrumb_items = array();
	foreach ( $crumbs as $i => $crumb ) {
		$breadcrumb_items[] = array( '@type' => 'ListItem', 'position' => $i + 1, 'name' => $crumb[0], 'item' => $crumb[1] );
	}
	$faq_items = array();
	foreach ( $faq_data as $faq ) {
		$faq_items[] = array( '@type' => 'Question', 'name' => $faq[0], 'acceptedAnswer' => array( '@type' => 'Answer', 'text' => $faq[1] ) );
	}
	$schema = array( '@context' => 'https://schema.org', '@graph' => array(
		array( '@type' => 'BreadcrumbList', 'itemListElement' => $breadcrumb_items ),
		array( '@type' => 'Service', 'name' => 'Magento B2B Solutions', 'serviceType' => 'Magento and Adobe Commerce B2B development', 'url' => get_permalink(), 'description' => 'Magento B2B development for company accounts, custom pricing, catalogs, quotes, approvals, bulk ordering, and operational integrations.', 'provider' => array( '@type' => 'Organization', 'name' => get_bloginfo('name'), 'url' => $home ) ),
		array( '@type' => 'FAQPage', 'mainEntity' => $faq_items ),
	) );
	echo '<style id="ethnic-magento-b2b-page-css">' . ethnic_magento_b2b_styles() . '</style>'; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
	echo '<meta name="description" content="Build scalable Magento B2B solutions with company accounts, customer-specific pricing, shared catalogs, quotes, approvals, bulk ordering, and ERP, CRM, or PIM integrations." />';
	echo '<script type="application/ld+json">' . wp_json_encode( $schema, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE ) . '</script>'; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
}
add_action( 'wp_head', 'ethnic_magento_b2b_head', 120 );

function ethnic_magento_b2b_title( $title ) {
	return ethnic_magento_b2b_is_target() ? 'Magento B2B Solutions | Adobe Commerce B2B Development Services' : $title;
}
add_filter( 'pre_get_document_title', 'ethnic_magento_b2b_title', 50 );

function ethnic_magento_b2b_body_class( $classes ) {
	if ( ethnic_magento_b2b_is_target() ) {
		$classes[] = 'ethnic-magento-b2b-target';
	}
	return $classes;
}
add_filter( 'body_class', 'ethnic_magento_b2b_body_class' );

function ethnic_magento_b2b_content( $content ) {
	if ( ! ethnic_magento_b2b_is_target() || ! in_the_loop() || ! is_main_query() ) {
		return $content;
	}
	static $rendered = false;
	if ( $rendered ) {
		return $content;
	}
	$rendered = true;
	return ethnic_magento_b2b_render();
}
add_filter( 'the_content', 'ethnic_magento_b2b_content', 1000 );