/* ============================================================
 * Novelty — coded homepage (front-page.php) + Deals page
 * New Arrivals carousel, Best Deals carousel, promo tile grid, brands.
 * (Hero slider and the Networking/UPS banner row were removed 2026-07-24;
 * their styles are gone with them.)
 * Brand colours: logo blue #0071bc, navy #132a79, green #009245.
 * ============================================================ */

.novelty-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). */
.novelty-hsec {
	position: relative;
	width: 100%;
}

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

/* ---------- Section heading ---------- */
.novelty-sec-head { margin: 0 0 20px; }
.novelty-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;
}
.novelty-sec-head p { color: #6b7280; margin: 0; font-size: 14.5px; }
.novelty-sec-head--row {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 16px;
}
.novelty-sec-link {
	flex: 0 0 auto;
	font-weight: 700;
	font-size: 14px;
	color: var(--mt-blue);
	text-decoration: none;
	white-space: nowrap;
}
.novelty-sec-link:hover { color: var(--mt-navy); }

/* ---------- Buttons ---------- */
.novelty-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;
}
.novelty-btn--primary { background: var(--mt-blue); color: #fff; }
.novelty-btn--primary:hover { background: var(--mt-blue-d); color: #fff; }

/* ---------- Image placeholders ---------- */
.novelty-ph {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 8px;
	background: repeating-linear-gradient(135deg, #f1f5f9 0 14px, #eef2f7 14px 28px);
	border: 1.5px dashed #cbd5e1;
	border-radius: 3px;
	color: #94a3b8;
	text-align: center;
	text-decoration: none;
	min-height: 100px;
	padding: 12px;
	overflow: hidden;
}
a.novelty-ph:hover { border-color: var(--mt-blue); color: var(--mt-blue); }
.novelty-ph__ico svg { width: 34px; height: 34px; display: block; }
.novelty-ph__txt { font-size: 13px; font-weight: 600; letter-spacing: .02em; }

/* Real image banners (slot-filling, category-linked) */
.novelty-imglink { display: block; border-radius: 3px; overflow: hidden; }
.novelty-imglink img { display: block; width: 100%; height: 100%; object-fit: cover; }
.novelty-imglink--tile { aspect-ratio: 1 / 1; }      /* promo tiles */

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

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

/* Turn the WooCommerce product grid into a horizontal track */
.novelty-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;
}
.novelty-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 */
.novelty-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;
}
.novelty-car-arrow svg { width: 20px; height: 20px; }
.novelty-car-arrow:hover { background: var(--mt-blue); color: #fff; }
.novelty-car-prev { left: -8px; }
.novelty-car-next { right: -8px; }
.novelty-car-arrow[hidden] { display: none; }

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

/* ============================================================
 * 3. PROMO TILE GRID (2 x 5)
 * ============================================================ */
.novelty-promo-sec { padding: 40px 0 8px; }
.novelty-promo-grid {
	display: grid;
	grid-template-columns: repeat(6, 1fr);
	gap: 14px;
}
.novelty-ph--tile { aspect-ratio: 1 / 1; min-height: 0; }

/* ============================================================
 * 4. OUR BRANDS
 * ============================================================ */
.novelty-brands-sec { padding: 42px 0 8px; }
.novelty-carousel--brands .novelty-carousel__viewport { padding: 4px 0; }
.novelty-brands-track {
	--bgap: 10px; /* minimal spacing between logos */
	display: flex;
	flex-wrap: nowrap;
	gap: var(--bgap);
}
.novelty-brand {
	flex: 0 0 auto;
	width: calc((100% - 14 * var(--bgap)) / 15); /* 15 visible before scroll (desktop) */
	scroll-snap-align: start;
	text-decoration: none;
}
.novelty-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;
}
.novelty-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. */
.novelty-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;
}
.novelty-brand:hover .novelty-brand__logo {
	border-color: var(--mt-blue);
	box-shadow: 0 4px 12px rgba(0, 113, 188, .15);
}

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

/* ============================================================
 * RESPONSIVE
 * ============================================================ */
@media (max-width: 1100px) {
	.novelty-carousel { --n: 4; }
	.novelty-promo-grid { grid-template-columns: repeat(4, 1fr); }
	.novelty-brand { width: calc((100% - 9 * var(--bgap)) / 10); } /* 10 visible */
}

@media (max-width: 900px) {
	.novelty-carousel { --n: 3; }
	.novelty-promo-grid { grid-template-columns: repeat(3, 1fr); }
	.novelty-brand { width: calc((100% - 6 * var(--bgap)) / 7); } /* 7 visible */
}

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