/* ============================================================
 * Fusion — coded homepage (front-page.php) + Deals page
 * New Arrivals carousel, Best Deals carousel, brands strip.
 * Brand colours: logo blue #0071bc, navy #132a79, green #009245.
 * ============================================================ */

.fusion-home { overflow-x: hidden; --mt-navy: #132a79; --mt-blue: #0071bc; --mt-blue-d: #005a96; --mt-green: #009245; }

/* Suppress the theme's empty archive header + top padding on the homepage. */
body.home .archive-header,
body.page-template .archive-header { display: none; }
body.home #content.site-content,
body.home .shoptimizer-archive > .col-full { padding-top: 0 !important; }

/* Sections sit inside the theme container (no full-bleed breakout — the
 * parent #primary has overflow-x:hidden which would clip a 100vw breakout
 * and cut content off on both sides). */
.fusion-hsec {
	position: relative;
	width: 100%;
}

.fusion-hwrap {
	max-width: 1320px;
	margin: 0 auto;
	padding: 0 24px;
}

/* ---------- Section heading ---------- */
.fusion-sec-head { margin: 0 0 20px; }
.fusion-sec-head h2 {
	font-size: clamp(20px, 1.3rem + 1vw, 28px);
	font-weight: 800;
	color: var(--mt-navy);
	margin: 0 0 4px;
	letter-spacing: -.01em;
}
.fusion-sec-head p { color: #6b7280; margin: 0; font-size: 14.5px; }
.fusion-sec-head--row {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 16px;
}
.fusion-sec-link {
	flex: 0 0 auto;
	font-weight: 700;
	font-size: 14px;
	color: var(--mt-blue);
	text-decoration: none;
	white-space: nowrap;
}
.fusion-sec-link:hover { color: var(--mt-navy); }

/* ---------- Buttons ---------- */
.fusion-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	font-weight: 700;
	font-size: 15px;
	line-height: 1;
	padding: 13px 26px;
	border-radius: 3px;
	text-decoration: none;
	border: 2px solid transparent;
	transition: background .15s, color .15s, border-color .15s;
}
.fusion-btn--primary { background: var(--mt-blue); color: #fff; }
.fusion-btn--primary:hover { background: var(--mt-blue-d); color: #fff; }

/* ============================================================
 * 1/2. CAROUSELS (New Arrivals, Best Deals)
 * ============================================================ */
.fusion-carousel-sec { padding: 40px 0 8px; }
.fusion-carousel {
	position: relative;
	--gap: 16px;
	--n: 6; /* items shown by default (desktop) — New Arrivals + Best Deals */
}

.fusion-carousel__viewport {
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	-ms-overflow-style: none;
	scrollbar-width: none;
}
.fusion-carousel__viewport::-webkit-scrollbar { display: none; }

/* Turn the WooCommerce product grid into a horizontal track */
.fusion-carousel__viewport ul.products {
	display: flex !important;
	flex-wrap: nowrap !important;
	grid-template-columns: none !important;
	gap: var(--gap);
	margin: 0 !important;
	padding: 4px 0;
}
.fusion-carousel__viewport ul.products li.product {
	flex: 0 0 auto;
	width: calc((100% - (var(--n) - 1) * var(--gap)) / var(--n)) !important;
	margin: 0 !important;
	scroll-snap-align: start;
}

/* Arrows */
.fusion-car-arrow {
	position: absolute;
	top: 42%;
	transform: translateY(-50%);
	width: 42px;
	height: 42px;
	border: 1px solid #e2e8f0;
	border-radius: 50%;
	background: #fff;
	color: var(--mt-blue);
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 3px 10px rgba(15, 23, 42, .12);
	z-index: 3;
	transition: opacity .15s, background .15s;
}
.fusion-car-arrow svg { width: 20px; height: 20px; }
.fusion-car-arrow:hover { background: var(--mt-blue); color: #fff; }
.fusion-car-prev { left: -8px; }
.fusion-car-next { right: -8px; }
.fusion-car-arrow[hidden] { display: none; }

/* ============================================================
 * 2. BEST DEALS — CTA
 * ============================================================ */
.fusion-deals-cta { text-align: center; margin-top: 22px; }

/* ============================================================
 * 3. OUR BRANDS
 * ============================================================ */
.fusion-brands-sec { padding: 42px 0 8px; }
.fusion-carousel--brands .fusion-carousel__viewport { padding: 4px 0; }
.fusion-brands-track {
	--bgap: 10px; /* minimal spacing between logos */
	display: flex;
	flex-wrap: nowrap;
	gap: var(--bgap);
}
.fusion-brand {
	flex: 0 0 auto;
	width: calc((100% - 14 * var(--bgap)) / 15); /* 15 visible before scroll (desktop) */
	scroll-snap-align: start;
	text-decoration: none;
}
.fusion-brand__logo {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	aspect-ratio: 3 / 2; /* landscape tile fits wordmark logos better than a square */
	background: #fff;
	border: 1px solid #eef2f7;
	border-radius: 3px;
	padding: 5px 6px;
	transition: border-color .15s, box-shadow .15s;
}
.fusion-brand__logo img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	display: block;
}
/* Fallback tile for a brand with no logo file yet: the brand name set as a
 * wordmark. Reads far better than initials ("Microsoft Surface" beats "MI"),
 * and sits on the same landscape tile so the strip stays even. */
.fusion-brand__logo--text {
	font-weight: 800;
	font-size: clamp(10px, 0.62rem + 0.25vw, 14px);
	line-height: 1.15;
	letter-spacing: .02em;
	text-transform: uppercase;
	text-align: center;
	color: var(--mt-navy);
	background: #f7f9fc;
	overflow: hidden;
	overflow-wrap: anywhere;
	hyphens: auto;
}
.fusion-brand:hover .fusion-brand__logo {
	border-color: var(--mt-blue);
	box-shadow: 0 4px 12px rgba(0, 113, 188, .15);
}

/* ============================================================
 * DEALS PAGE (page-deals.php)
 * ============================================================ */
.fusion-deals-hero { padding: 30px 0 6px; text-align: center; }
.fusion-deals-hero h1 {
	font-size: clamp(26px, 1.5rem + 1.5vw, 38px);
	font-weight: 800;
	color: #0f172a;
	margin: 0 0 8px;
}
.fusion-deals-hero p { color: #6b7280; margin: 0 auto; max-width: 640px; }
.fusion-deals-grid-sec { padding: 24px 0 48px; }
.fusion-deals-intro { margin: 0 auto 28px; max-width: 800px; }
.fusion-deals-grid-sec ul.products { margin-top: 8px; }

/* ============================================================
 * RESPONSIVE
 * ============================================================ */
@media (max-width: 1100px) {
	.fusion-carousel { --n: 4; }
	.fusion-brand { width: calc((100% - 9 * var(--bgap)) / 10); } /* 10 visible */
}

@media (max-width: 900px) {
	.fusion-carousel { --n: 3; }
	.fusion-brand { width: calc((100% - 6 * var(--bgap)) / 7); } /* 7 visible */
}

@media (max-width: 600px) {
	.fusion-hwrap { padding: 0 15px; }
	.fusion-carousel-sec,
	.fusion-brands-sec { padding: 28px 0 4px; }
	.fusion-carousel { --n: 2; --gap: 12px; } /* New Arrivals + Best Deals: show 2 */
	.fusion-brand { width: calc((100% - 3 * var(--bgap)) / 4); } /* Brands: ~4 across, drag for more */
	/* Arrows hidden on touch; drag/swipe instead */
	.fusion-car-arrow { display: none !important; }
	.fusion-sec-head--row { align-items: center; }
}
