{{--
Theme override of plugins/ecommerce::themes.includes.cross-sale-products.
The plugin ships a Slick-based carousel, but Slick isn't bundled in this
theme — leaving the cross-sale "Frequently Bought Together" block as a
static row with overflow:hidden, no arrows, no mobile scroll.
This override swaps to the theme's existing Swiper infrastructure
(.tf-swiper auto-init via amerceInitSwipers) which is already loaded
via assets/js/carousel.js, then re-initialises Swiper after the AJAX
replaceWith() since the plugin's initSlickCarousel() can't.
Keeps the plugin's class names (.ec-cross-sale-*) so the rebrand SCSS
in _ecommerce-upsale-crosssale.scss continues to win specificity.
--}}
@php
use Botble\Ecommerce\Facades\EcommerceHelper;
use Botble\Media\Facades\RvMedia;
@endphp
@if(request()->ajax() && isset($products) && isset($parentProduct))
@if($products->isNotEmpty())
{{ __('Frequently Bought Together') }}
{{ __('Customers who viewed this item also bought') }}
{{-- Theme icomoon set has icon-CaretLeft but no icon-CaretRight
(only CaretRightThin); ArrowLeft/ArrowRight are the only
symmetric pair that's both available and tonally similar. --}}
{{-- A MutationObserver in assets/js/carousel.js detects the AJAX-injected
.ec-cross-sale-section and calls amerceInitSwipers() on its swiper —
no inline