/* ============================================================
 * Newzon — coded homepage (front-page.php) + Deals page
 * Wireframe build 2026-07-11: hero slider + banners, New Arrivals
 * carousel, banner row, Best Deals carousel, promo tile grid, brands.
 * Brand colours: primary #135289, accent green #009245.
 * ============================================================ */

.newzon-home { overflow-x: hidden; --mt-blue: #135289; --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). */
.newzon-hsec {
	position: relative;
	width: 100%;
}

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

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

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

/* ---------- Image placeholders ---------- */
.newzon-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.newzon-ph:hover { border-color: var(--mt-blue); color: var(--mt-blue); }
.newzon-ph__ico svg { width: 34px; height: 34px; display: block; }
.newzon-ph__txt { font-size: 13px; font-weight: 600; letter-spacing: .02em; }

/* ============================================================
 * 1. HERO
 * ============================================================ */
.newzon-hero-sec { padding: 22px 0 8px; }
.newzon-hero {
	display: grid;
	grid-template-columns: minmax(0, 2.15fr) minmax(0, 1fr);
	gap: 16px;
}

/* Slider */
.newzon-slider {
	position: relative;
	border-radius: 3px;
	overflow: hidden;
	background: #eef2f7;
}
.newzon-slider__track {
	display: flex;
	transition: transform .45s cubic-bezier(.4, 0, .2, 1);
	touch-action: pan-y;
}
.newzon-slide { flex: 0 0 100%; }
.newzon-slide__link { display: block; }
.newzon-slide__img { display: block; width: 100%; height: auto; aspect-ratio: 1600 / 570; object-fit: cover; }
.newzon-ph--slide {
	min-height: 270px;
	height: 100%;
	border: 0;
	border-radius: 0;
	background: repeating-linear-gradient(135deg, #e6edf5 0 20px, #dfe7f1 20px 40px);
	color: #7c93ac;
}
.newzon-ph--slide .newzon-ph__ico svg { width: 48px; height: 48px; }
.newzon-ph--slide .newzon-ph__txt { font-size: 15px; }

.newzon-slider__nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 40px;
	height: 40px;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, .9);
	color: var(--mt-blue);
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 2px 8px rgba(0, 0, 0, .15);
	z-index: 2;
}
.newzon-slider__nav svg { width: 20px; height: 20px; }
.newzon-slider__prev { left: 12px; }
.newzon-slider__next { right: 12px; }
.newzon-slider__nav:hover { background: #fff; }

.newzon-slider__dots {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 12px;
	display: flex;
	justify-content: center;
	gap: 8px;
	z-index: 2;
}
.newzon-slider__dots button {
	width: 9px;
	height: 9px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, .6);
	cursor: pointer;
}
.newzon-slider__dots button.is-active { background: #fff; width: 22px; border-radius: 5px; }

/* Hero banners (stacked) — desktop: fill the slider height (2 short strips). */
.newzon-hero-banners {
	display: grid;
	grid-template-rows: minmax(0, 1fr) minmax(0, 1fr);
	gap: 16px;
}
.newzon-ph--hero-banner { min-height: 0; }

/* Real image banners (slot-filling, category-linked) */
.newzon-imglink { display: block; border-radius: 3px; overflow: hidden; }
.newzon-imglink img { display: block; width: 100%; height: 100%; object-fit: cover; }
.newzon-hero-banner-img { height: 100%; }          /* right hero banners fill the slider height */
.newzon-imglink--wide { aspect-ratio: 1200 / 410; } /* feature banner row */
.newzon-imglink--tile { aspect-ratio: 1 / 1; }      /* promo tiles */

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

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

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

/* ============================================================
 * 3. BANNER ROW
 * ============================================================ */
.newzon-banner-row-sec { padding: 34px 0 8px; }
.newzon-banner-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
}
.newzon-ph--wide { min-height: 190px; }

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

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

/* ============================================================
 * 6. OUR BRANDS
 * ============================================================ */
.newzon-brands-sec { padding: 42px 0 8px; }
.newzon-carousel--brands .newzon-carousel__viewport { padding: 4px 0; }
.newzon-brands-track {
	--bgap: 10px; /* minimal spacing between logos */
	display: flex;
	flex-wrap: nowrap;
	gap: var(--bgap);
}
.newzon-brand {
	flex: 0 0 auto;
	width: calc((100% - 14 * var(--bgap)) / 15); /* 15 visible before scroll (desktop) */
	scroll-snap-align: start;
	text-decoration: none;
}
.newzon-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;
}
.newzon-brand__logo img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	display: block;
}
/* Fallback tile for a brand with no logo file yet: styled initials. */
.newzon-brand__logo--text {
	font-weight: 700;
	font-size: 18px;
	letter-spacing: .04em;
	color: var(--mt-blue);
	background: #f7f9fc;
}
.newzon-brand:hover .newzon-brand__logo {
	border-color: var(--mt-blue);
	box-shadow: 0 4px 12px rgba(19, 82, 137, .15);
}

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

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

@media (max-width: 900px) {
	.newzon-hero { grid-template-columns: 1fr; }
	.newzon-hero-banners { grid-template-rows: none; grid-template-columns: 1fr 1fr; }
	.newzon-hero-banner-img { height: auto; aspect-ratio: 700 / 250; } /* natural size when side-by-side */
	.newzon-ph--slide { min-height: 150px; }
	.newzon-ph--hero-banner { min-height: 130px; }
	.newzon-carousel { --n: 3; }
	.newzon-promo-grid { grid-template-columns: repeat(3, 1fr); }
	.newzon-brand { width: calc((100% - 6 * var(--bgap)) / 7); } /* 7 visible */
}

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