<?php
/** Factory proof section. @package Fragrance_Trade */
if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

$factory_fallbacks   = array(
	'store/storefront.jpg',
	'store/showroom-main.jpg',
	'store/showroom-consultation.jpg',
);
$factory_alts      = array(
	__( '门店临街门头', 'fragrance-trade' ),
	__( '门店接待与施工环境', 'fragrance-trade' ),
	__( '门店咨询与产品展示区', 'fragrance-trade' ),
);
$factory_extra_image = fragrance_trade_get_mod( 'b2b_factory_image_4', '' );
?>
<section id="factory" class="b2b-section factory-proof">
	<div class="container">
		<div class="row g-5 align-items-center">
			<div class="col-lg-5">
				<p class="section-eyebrow"><?php echo esc_html( fragrance_trade_get_mod( 'b2b_factory_eyebrow' ) ); ?></p>
				<h2><?php echo esc_html( fragrance_trade_get_mod( 'b2b_factory_title' ) ); ?></h2>
				<p class="section-lead"><?php echo esc_html( fragrance_trade_get_mod( 'b2b_factory_text' ) ); ?></p>
				<ul class="factory-points list-unstyled mt-4">
					<?php for ( $index = 1; $index <= 4; $index++ ) : ?>
						<li><span aria-hidden="true">✓</span><?php echo esc_html( fragrance_trade_get_mod( 'b2b_factory_point_' . $index ) ); ?></li>
					<?php endfor; ?>
				</ul>
			</div>
			<div class="col-lg-7">
				<div class="factory-gallery">
					<?php foreach ( $factory_fallbacks as $offset => $fallback ) : ?>
						<?php $index = $offset + 1; ?>
						<figure>
							<img src="<?php echo esc_url( fragrance_trade_image_uri( 'b2b_factory_image_' . $index, $fallback ) ); ?>" alt="<?php echo esc_attr( $factory_alts[ $offset ] ); ?>" width="1600" height="1199" loading="lazy" decoding="async">
						</figure>
					<?php endforeach; ?>
					<?php if ( $factory_extra_image ) : ?>
						<figure class="factory-gallery-extra">
							<img src="<?php echo esc_url( $factory_extra_image ); ?>" alt="<?php esc_attr_e( '门店补充实景', 'fragrance-trade' ); ?>" loading="lazy" decoding="async">
						</figure>
					<?php endif; ?>
				</div>
			</div>
		</div>
	</div>
</section>
