/* ==========================================================================
   BINAWATT — homepage
   ========================================================================== */

.bw-home { background: var(--bw-white); }

/* Hero
   -------------------------------------------------------------------------- */
.bw-hero { padding-top: 24px; }
.bw-hero__grid {
	display: grid;
	grid-template-columns: minmax(0, 2.1fr) minmax(0, 1fr);
	gap: 20px;
}

.bw-slider {
	position: relative;
	min-height: 500px;
	overflow: hidden;
	border-radius: 20px;
	background: var(--bw-navy-900);
	isolation: isolate;
}
.bw-slide {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	z-index: 0;
	opacity: 0;
	visibility: hidden;
	transition: opacity .7s var(--bw-ease), visibility .7s;
}
.bw-slide.is-active { opacity: 1; visibility: visible; z-index: 1; }
.bw-slide__bg {
	position: absolute;
	inset: 0;
	z-index: -2;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transform: scale(1.06);
	transition: transform 7s linear;
}
.bw-slide.is-active .bw-slide__bg { transform: scale(1); }
.bw-slide::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background:
		linear-gradient(90deg, rgba(7, 26, 66, .96) 0%, rgba(7, 26, 66, .86) 38%, rgba(7, 26, 66, .25) 75%, rgba(7, 26, 66, .1) 100%),
		radial-gradient(circle at 0% 100%, rgba(245, 130, 31, .35), transparent 45%);
}
.bw-slide__content { max-width: 560px; padding: 48px 56px 72px; }
.bw-slide__title {
	margin: 0 0 16px;
	color: var(--bw-white);
	font-size: clamp(32px, 4vw, 52px);
	font-weight: 800;
	line-height: 1.06;
	letter-spacing: -.03em;
}
.bw-slide__text { margin: 0 0 28px; color: rgba(255, 255, 255, .8); font-size: 17px; line-height: 1.6; }
.bw-slide__actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* Content animates in with the active slide. */
.bw-slide__content > * { opacity: 0; transform: translateY(14px); transition: opacity .6s var(--bw-ease), transform .6s var(--bw-ease); }
.bw-slide.is-active .bw-slide__content > * { opacity: 1; transform: none; }
.bw-slide.is-active .bw-slide__content > :nth-child(2) { transition-delay: .08s; }
.bw-slide.is-active .bw-slide__content > :nth-child(3) { transition-delay: .16s; }
.bw-slide.is-active .bw-slide__content > :nth-child(4) { transition-delay: .24s; }

.bw-slider__dots {
	position: absolute;
	left: 56px;
	bottom: 30px;
	z-index: 2;
	display: flex;
	gap: 8px;
}
.bw-slider__dot {
	position: relative;
	width: 34px;
	height: 5px;
	padding: 0;
	overflow: hidden;
	border: 0;
	border-radius: 999px;
	background: rgba(255, 255, 255, .3);
	cursor: pointer;
}
.bw-slider__dot::after {
	content: "";
	position: absolute;
	inset: 0;
	background: var(--bw-orange);
	transform: scaleX(0);
	transform-origin: left;
}
.bw-slider__dot.is-active::after { animation: bw-progress var(--bw-slide-ms, 6000ms) linear forwards; }
.bw-slider.is-paused .bw-slider__dot.is-active::after { animation-play-state: paused; }
@keyframes bw-progress { to { transform: scaleX(1); } }

.bw-hero__side { display: grid; grid-template-rows: 1fr 1fr; gap: 20px; }

/* Promo tiles (hero side + wide banners) */
.bw-promo {
	position: relative;
	display: flex;
	align-items: flex-end;
	min-height: 240px;
	overflow: hidden;
	border-radius: 20px;
	background: var(--bw-navy);
	color: var(--bw-white);
	text-decoration: none;
	isolation: isolate;
}
.bw-promo img {
	position: absolute;
	inset: 0;
	z-index: -2;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .7s var(--bw-ease);
}
.bw-promo::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background: linear-gradient(180deg, rgba(7, 26, 66, 0) 20%, rgba(7, 26, 66, .92) 100%);
}
.bw-promo:hover img { transform: scale(1.06); }
.bw-promo__body { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 24px; }
.bw-promo__tag {
	padding: 5px 11px;
	border-radius: 999px;
	background: var(--bw-orange);
	color: var(--bw-white);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .02em;
}
.bw-promo__tag--navy { background: var(--bw-white); color: var(--bw-navy); }
.bw-promo__title { color: var(--bw-white); font-size: 22px; font-weight: 800; line-height: 1.2; letter-spacing: -.01em; }
.bw-promo__link { display: inline-flex; align-items: center; gap: 6px; color: rgba(255, 255, 255, .9); font-size: 14px; font-weight: 600; }
.bw-promo__link .bw-icon { width: 16px; height: 16px; color: var(--bw-orange); transition: transform .18s var(--bw-ease); }
.bw-promo:hover .bw-promo__link .bw-icon { transform: translateX(4px); }

/* Features strip
   -------------------------------------------------------------------------- */
.bw-features { padding-top: 20px; }
.bw-features__list {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	margin: 0;
	padding: 0;
	list-style: none;
	border: 1px solid var(--bw-line);
	border-radius: 16px;
	background: var(--bw-white);
}
.bw-feature { display: flex; align-items: center; gap: 14px; padding: 22px 24px; }
.bw-feature + .bw-feature { border-left: 1px solid var(--bw-line); }
.bw-feature__icon {
	display: grid;
	place-items: center;
	flex: none;
	width: 48px;
	height: 48px;
	border-radius: 12px;
	background: var(--bw-orange-50);
	color: var(--bw-orange-600);
}
.bw-feature__icon .bw-icon { width: 24px; height: 24px; }
.bw-feature strong { display: block; color: var(--bw-ink); font-size: 15px; }
.bw-feature span span { color: var(--bw-muted); font-size: 13px; }

/* Categories
   -------------------------------------------------------------------------- */
.bw-cats {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
	gap: 18px;
	margin: 0;
	padding: 0;
	list-style: none;
}
.bw-cat__link {
	display: flex;
	flex-direction: column;
	height: 100%;
	padding: 8px 8px 16px;
	border: 1px solid var(--bw-line);
	border-radius: 16px;
	background: var(--bw-white);
	text-decoration: none;
	transition: border-color .2s, box-shadow .25s var(--bw-ease), transform .25s var(--bw-ease);
}
.bw-cat__link:hover {
	border-color: transparent;
	box-shadow: 0 18px 40px -16px rgba(7, 26, 66, .28);
	transform: translateY(-4px);
}
.bw-cat__media {
	position: relative;
	display: block;
	margin-bottom: 14px;
	overflow: hidden;
	border-radius: 11px;
	background: var(--bw-bg);
	aspect-ratio: 16 / 11;
}
.bw-cat__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .5s var(--bw-ease);
}
.bw-cat__link:hover .bw-cat__media img { transform: scale(1.07); }
.bw-cat__fallback { position: absolute; inset: 30%; width: 40%; height: 40%; color: var(--bw-navy); }
.bw-cat__icon {
	position: absolute;
	left: 10px;
	bottom: 10px;
	display: grid;
	place-items: center;
	width: 38px;
	height: 38px;
	border-radius: 10px;
	background: var(--bw-white);
	color: var(--bw-orange-600);
	box-shadow: var(--bw-shadow-sm);
}
.bw-cat__name { padding: 0 8px; color: var(--bw-ink); font-size: 16px; font-weight: 700; }
.bw-cat__subs {
	display: -webkit-box;
	margin-top: 4px;
	padding: 0 8px;
	overflow: hidden;
	color: var(--bw-muted);
	font-size: 13px;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
}
.bw-cat__link:hover .bw-cat__name { color: var(--bw-orange-600); }

/* Deals
   -------------------------------------------------------------------------- */
.bw-deals { background: linear-gradient(180deg, var(--bw-white) 0, var(--bw-bg) 0); }
.bw-deals .bw-container { padding-block: 0; }
.bw-deals__grid {
	display: grid;
	grid-template-columns: 300px minmax(0, 1fr);
	gap: 24px;
	align-items: stretch;
}
.bw-deals__intro {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	padding: 32px 28px;
	overflow: hidden;
	border-radius: 20px;
	background: var(--bw-navy);
	color: var(--bw-white);
	isolation: isolate;
}
.bw-deals__intro::after {
	content: "";
	position: absolute;
	right: -90px;
	bottom: -90px;
	z-index: -1;
	width: 260px;
	height: 260px;
	border-radius: 50%;
	background: radial-gradient(circle, rgba(245, 130, 31, .55), transparent 70%);
}
.bw-deals__title { margin: 0 0 10px; color: var(--bw-white); font-size: 30px; font-weight: 800; line-height: 1.1; letter-spacing: -.02em; }
.bw-deals__text { margin: 0 0 24px; color: rgba(255, 255, 255, .75); font-size: 15px; }
.bw-deals__intro .bw-btn { margin-top: auto; }

.bw-countdown { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; width: 100%; margin-bottom: 28px; }
.bw-countdown__unit {
	display: flex;
	flex-direction: column;
	align-items: center;
	padding: 10px 0 8px;
	border: 1px solid rgba(255, 255, 255, .14);
	border-radius: 12px;
	background: rgba(255, 255, 255, .06);
}
.bw-countdown__unit strong { color: var(--bw-white); font-size: 26px; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.1; }
.bw-countdown__unit span { color: rgba(255, 255, 255, .6); font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }

.bw-rail { min-width: 0; }
.bw-rail__top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.bw-rail__label { margin: 0; color: var(--bw-muted); font-size: 14px; font-weight: 600; }
.bw-deals .woocommerce ul.products.bw-grid--rail { grid-auto-columns: calc((100% - 2 * 20px) / 3); }

/* Tabs
   -------------------------------------------------------------------------- */
.bw-tabs {
	display: inline-flex;
	gap: 4px;
	padding: 4px;
	border-radius: 999px;
	background: var(--bw-bg);
}
.bw-tab {
	padding: 10px 18px;
	border: 0;
	border-radius: 999px;
	background: transparent;
	color: var(--bw-muted);
	font: 600 14px/1 var(--bw-font);
	cursor: pointer;
	transition: background .18s, color .18s, box-shadow .18s;
}
.bw-tab:hover { color: var(--bw-navy); background: transparent; }
.bw-tab.is-active { background: var(--bw-white); color: var(--bw-navy); box-shadow: var(--bw-shadow-sm); }
.bw-tabpanel:not([hidden]) { animation: bw-fade .35s var(--bw-ease); }
@keyframes bw-fade { from { opacity: 0; transform: translateY(8px); } }
.bw-tabpanel ul.products { margin-bottom: 0; }

/* Wide promos
   -------------------------------------------------------------------------- */
.bw-promos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.bw-promo--wide { min-height: 300px; align-items: center; }
.bw-promo--wide::before { background: linear-gradient(90deg, rgba(7, 26, 66, .94) 0%, rgba(7, 26, 66, .7) 50%, rgba(7, 26, 66, .1) 100%); }
.bw-promo--orange::before { background: linear-gradient(90deg, rgba(196, 86, 0, .95) 0%, rgba(224, 111, 12, .78) 50%, rgba(224, 111, 12, .1) 100%); }
.bw-promo--orange .bw-promo__tag { background: var(--bw-white); color: var(--bw-orange-600); }
.bw-promo--wide .bw-promo__body { max-width: 360px; padding: 36px; gap: 14px; }
.bw-promo--wide .bw-promo__title { font-size: 26px; }

/* Contractor CTA
   -------------------------------------------------------------------------- */
.bw-contractor {
	display: grid;
	grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
	overflow: hidden;
	border-radius: 24px;
	background: var(--bw-navy);
	color: var(--bw-white);
}
.bw-contractor__content { padding: 52px 56px; }
.bw-contractor__title { margin: 0 0 22px; color: var(--bw-white); font-size: clamp(26px, 3vw, 38px); font-weight: 800; line-height: 1.12; letter-spacing: -.02em; }
.bw-contractor__perks { display: grid; gap: 12px; margin: 0 0 30px; padding: 0; list-style: none; }
.bw-contractor__perks li { display: flex; align-items: center; gap: 12px; color: rgba(255, 255, 255, .85); font-size: 16px; }
.bw-contractor__perks .bw-icon {
	width: 24px;
	height: 24px;
	padding: 4px;
	border-radius: 50%;
	background: var(--bw-orange);
	color: var(--bw-white);
	box-sizing: border-box;
}
.bw-contractor__media { position: relative; min-height: 360px; }
.bw-contractor__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.bw-contractor__media::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
	background: linear-gradient(90deg, var(--bw-navy) 0%, rgba(13, 44, 108, 0) 35%);
}
.bw-contractor__stat {
	position: absolute;
	right: 24px;
	bottom: 24px;
	z-index: 2;
	display: flex;
	flex-direction: column;
	padding: 16px 20px;
	border-radius: 16px;
	background: var(--bw-white);
	color: var(--bw-ink);
	box-shadow: var(--bw-shadow);
}
.bw-contractor__stat strong { color: var(--bw-orange-600); font-size: 30px; font-weight: 800; line-height: 1; }
.bw-contractor__stat span { color: var(--bw-muted); font-size: 13px; font-weight: 500; }

/* Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 1200px) {
	.bw-deals__grid { grid-template-columns: 270px minmax(0, 1fr); }
	.bw-deals .woocommerce ul.products.bw-grid--rail { grid-auto-columns: calc((100% - 20px) / 2.4); }
}

@media (max-width: 1024px) {
	.bw-hero__grid { grid-template-columns: 1fr; }
	.bw-hero__side { grid-template-columns: 1fr 1fr; grid-template-rows: none; }
	.bw-slider { min-height: 440px; }
	.bw-features__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.bw-feature:nth-child(3) { border-left: 0; }
	.bw-feature:nth-child(n + 3) { border-top: 1px solid var(--bw-line); }
	.bw-deals__grid { grid-template-columns: 1fr; }
	.bw-deals__intro { display: grid; grid-template-columns: 1fr auto; column-gap: 32px; }
	.bw-deals__intro > * { grid-column: 1; }
	.bw-deals__intro .bw-countdown { grid-column: 2; grid-row: 1 / span 3; align-self: center; width: 300px; margin: 0; }
	.bw-deals__intro .bw-btn { grid-column: 2; margin-top: 12px; justify-self: stretch; }
	.bw-deals .woocommerce ul.products.bw-grid--rail { grid-auto-columns: calc((100% - 2 * 20px) / 3); }
	.bw-contractor { grid-template-columns: 1fr; }
	.bw-contractor__media { min-height: 280px; order: -1; }
	.bw-contractor__media::before { background: linear-gradient(0deg, var(--bw-navy) 0%, rgba(13, 44, 108, 0) 45%); }
}

@media (max-width: 768px) {
	.bw-hero { padding-top: 14px; }
	.bw-slider { min-height: 480px; border-radius: 16px; }
	.bw-slide { align-items: flex-end; }
	.bw-slide::before { background: linear-gradient(0deg, rgba(7, 26, 66, .97) 0%, rgba(7, 26, 66, .85) 55%, rgba(7, 26, 66, .3) 100%); }
	.bw-slide__content { padding: 28px 22px 64px; }
	.bw-slide__text { font-size: 15px; }
	.bw-slider__dots { left: 22px; bottom: 26px; }
	.bw-hero__side { grid-template-columns: 1fr; gap: 12px; }
	.bw-promo { min-height: 180px; border-radius: 16px; }
	.bw-promo__title { font-size: 19px; }
	.bw-features__list { grid-template-columns: 1fr 1fr; }
	.bw-feature { flex-direction: column; align-items: flex-start; gap: 10px; padding: 16px; }
	.bw-feature + .bw-feature { border-left: 0; }
	.bw-feature:nth-child(even) { border-left: 1px solid var(--bw-line); }
	.bw-feature:nth-child(n + 3) { border-top: 1px solid var(--bw-line); }
	.bw-cats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
	.bw-cat__name { font-size: 14px; }
	.bw-cat__subs { display: none; }
	.bw-cat__icon { width: 32px; height: 32px; }
	.bw-deals__intro { display: flex; padding: 26px 22px; }
	.bw-deals__intro .bw-countdown { width: 100%; margin-bottom: 20px; }
	.bw-deals__intro .bw-btn { margin-top: 0; align-self: stretch; }
	.bw-deals .woocommerce ul.products.bw-grid--rail { grid-auto-columns: 62%; }
	.bw-tabs { width: 100%; overflow-x: auto; }
	.bw-tab { flex: 1; white-space: nowrap; padding: 10px 12px; }
	.bw-promos { grid-template-columns: 1fr; gap: 12px; }
	.bw-promo--wide { min-height: 240px; }
	.bw-promo--wide .bw-promo__body { padding: 24px; }
	.bw-promo--wide .bw-promo__title { font-size: 21px; }
	.bw-contractor { border-radius: 18px; }
	.bw-contractor__content { padding: 28px 22px 32px; }
	.bw-contractor__perks li { font-size: 15px; }
}
