/**
 * AdFlux homepage presentation.
 *
 * Isolated from the legacy stylesheet so the converted storefront can evolve
 * without changing cart, checkout, account, or product-page behaviour.
 */

.home {
	--adflux-home-accent: #ff7a1a;
	--adflux-home-accent-dark: #e85f00;
	--adflux-home-ink: #17211f;
	--adflux-home-muted: #66716e;
	--adflux-home-border: #eadfd7;
	--adflux-home-surface: #fbfaf7;
	--adflux-home-section-space: 1.25rem;
	background: var(--adflux-home-surface);
}

.home .dpm-main {
	background: var(--adflux-home-surface);
}

.home .dpm-site-header,
.home .dpm-site-header.is-sticky {
	border-bottom: 1px solid var(--adflux-home-border);
	background: #fff;
	box-shadow: 0 4px 18px rgba(30, 42, 38, 0.07);
}

.home.dpm-has-sticky-header .dpm-site-header.is-sticky {
	position: relative;
}

.home .dpm-header-inner {
	min-height: 118px;
	gap: clamp(0.75rem, 2vw, 1.5rem);
}

.home.dpm-has-sticky-header .dpm-main {
	padding-top: 0;
}

.home .dpm-site-header .dpm-brand,
.home .dpm-site-header .dpm-brand:hover {
	color: var(--adflux-home-ink);
}

.home .dpm-site-header .dpm-brand-accent {
	color: var(--adflux-home-accent);
}

.home .dpm-site-header .dpm-primary-nav a:hover,
.home .dpm-site-header .dpm-primary-nav .current-menu-item > a {
	color: var(--dpm-menu-active, var(--adflux-home-accent));
}

.home .dpm-site-header .dpm-primary-nav a {
	color: var(--dpm-menu-text, #fff);
	font-size: 0.84rem;
}

@media (max-width: 1024px) {
	.home { --adflux-home-section-space: 1.125rem; }
	.home .dpm-header-inner { min-height: 68px; }
}

.home .dpm-site-header .dpm-icon-button {
	color: var(--adflux-home-ink);
}

.home .dpm-site-header .dpm-icon-button:hover {
	background: #fff3e8;
	color: var(--adflux-home-accent-dark);
}

.home .dpm-container {
	max-width: 1280px;
}

.home .dpm-section {
	padding-block: var(--adflux-home-section-space);
}

.home .dpm-section-heading {
	align-items: end;
	margin-bottom: 0.75rem;
}

.home .dpm-section-heading h2 {
	color: var(--adflux-home-ink);
	font-size: clamp(1.2rem, 2vw, 1.65rem);
	line-height: 1.2;
}

.home .dpm-section-heading h2::after {
	display: block;
	width: 2.5rem;
	height: 3px;
	margin-top: 0.45rem;
	border-radius: 999px;
	background: var(--adflux-home-accent);
	content: "";
}

.home .dpm-section-heading p {
	color: var(--adflux-home-muted);
}

.home .adflux-banner {
	padding-block: var(--adflux-home-section-space);
	background: var(--adflux-home-surface);
}

.home .adflux-banner__viewport,
.home .adflux-banner__slides,
.home .adflux-banner__slide {
	position: relative;
}

.home .adflux-banner__viewport {
	max-width: 1200px;
}

.home .adflux-banner__slides,
.home .adflux-banner__slide,
.home .adflux-banner__slide a,
.home .adflux-banner__slide picture {
	height: var(--adflux-banner-height, 500px);
}

.home .adflux-banner__slides.has-side-banner {
	display: grid;
	gap: clamp(0.75rem, 1.5vw, 1.25rem);
	grid-template-columns: minmax(0, 1fr) clamp(240px, calc(var(--adflux-banner-height, 500px) * 1.2195), 500px);
}

.home .adflux-banner__slide {
	overflow: hidden;
	border-radius: 12px;
	background: #f3f4f6;
}

.home .adflux-banner__side {
	order: 1;
	overflow: hidden;
	height: var(--adflux-banner-height, 500px);
	border-radius: 12px;
	background: #f3f4f6;
}

.home .adflux-banner__side a { display: block; height: 100%; }

@media (min-width: 641px) {
	.home .adflux-banner__slides.has-side-banner .adflux-banner__slide .adflux-banner__image {
		object-fit: cover;
	}
}

.home .adflux-banner__slide[hidden] {
	display: none;
}

.home .adflux-banner__slide a,
.home .adflux-banner__slide picture {
	display: block;
}

.home .adflux-banner__image {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.home .adflux-banner__controls {
	position: absolute;
	top: 0;
	right: 0;
	left: 0;
	z-index: 3;
	display: block;
	height: var(--adflux-banner-height, 500px);
	pointer-events: none;
}

.home .adflux-banner__viewport.has-side-banner .adflux-banner__controls {
	right: calc(clamp(240px, calc(var(--adflux-banner-height, 500px) * 1.2195), 500px) + clamp(0.75rem, 1.5vw, 1.25rem));
}

.home .adflux-banner__controls button {
	display: inline-grid;
	width: 2rem;
	height: 2rem;
	padding: 0;
	border: 1px solid var(--adflux-home-border);
	border-radius: 999px;
	background: #fff;
	color: var(--adflux-home-text);
	place-items: center;
	cursor: pointer;
	pointer-events: auto;
	box-shadow: 0 6px 18px rgba(15, 23, 42, 0.14);
}

.home .adflux-banner__controls > [data-adflux-banner-prev],
.home .adflux-banner__controls > [data-adflux-banner-next] {
	position: absolute;
	top: 50%;
	width: 2.5rem;
	height: 2.5rem;
	border: 0;
	border-radius: 0;
	background: transparent;
	box-shadow: none;
	color: var(--adflux-home-accent);
	font-size: 1.75rem;
	font-weight: 900;
	line-height: 1;
	text-shadow: 0 1px 1px rgba(15, 23, 42, 0.18);
	transform: translateY(-50%);
}

.home .adflux-banner__controls > [data-adflux-banner-prev] { left: 0.75rem; }
.home .adflux-banner__controls > [data-adflux-banner-next] { right: 0.75rem; }
.home .adflux-banner__controls > [data-adflux-banner-pause] {
	display: none;
}

.home .adflux-banner__dots {
	position: absolute;
	bottom: 0.95rem;
	left: 1rem;
	display: flex;
	gap: 0.4rem;
	pointer-events: auto;
}

.home .adflux-banner__dots button {
	width: 0.65rem;
	height: 0.65rem;
	border: 0;
	background: #cbd5e1;
}

.home .adflux-banner__dots button[aria-current="true"] {
	background: var(--adflux-home-accent);
}

.home .dpm-category-section {
	padding-block: var(--adflux-home-section-space);
	background: var(--adflux-home-surface);
}

.home .dpm-category-section .dpm-section-heading {
	width: 100%;
	align-items: center;
	justify-content: center;
	text-align: center;
}

.home .dpm-category-section .dpm-section-heading h2 {
	margin-inline: auto;
}

.home .dpm-category-section .dpm-section-heading h2::after {
	margin-inline: auto;
}

.home .adflux-category-carousel {
	position: relative;
	width: 100%;
	max-width: var(--dpm-category-viewport, 100%);
	margin-inline: auto;
}

.home .dpm-category-grid {
	display: flex;
	gap: clamp(0.65rem, 1.4vw, 1rem);
	overflow-x: auto;
	overflow-y: hidden;
	padding: 0.2rem 0 0.65rem;
	overscroll-behavior-inline: contain;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
	touch-action: pan-y;
	cursor: grab;
	user-select: none;
}

.home .dpm-category-grid.is-dragging {
	scroll-snap-type: none;
	cursor: grabbing;
}

.home .dpm-category-grid img {
	-webkit-user-drag: none;
}

.home .dpm-category-grid::-webkit-scrollbar {
	display: none;
}

.home .adflux-category-carousel__control {
	position: absolute;
	z-index: 3;
	top: calc(50% - 1.25rem);
	display: grid;
	width: 2.5rem;
	height: 2.5rem;
	padding: 0;
	place-items: center;
	border: 0;
	border-radius: 50%;
	background: var(--adflux-home-accent);
	box-shadow: 0 7px 18px rgba(51, 32, 18, 0.18);
	color: #fff;
	cursor: pointer;
	transform: translateY(-50%);
}

.home .adflux-category-carousel__control--previous { left: -0.75rem; }
.home .adflux-category-carousel__control--next { right: -0.75rem; }

.home .adflux-category-carousel__control:hover,
.home .adflux-category-carousel__control:focus-visible {
	background: var(--adflux-home-accent-dark);
}

.home .dpm-category-card {
	flex: 0 0 var(--dpm-category-icon-size, 220px);
	min-width: 0;
	min-height: 0;
	justify-content: flex-start;
	padding: 0;
	border: 0;
	border-radius: 14px;
	background: transparent;
	box-shadow: none;
	scroll-snap-align: start;
}

.home .dpm-category-card:hover {
	background: transparent;
	box-shadow: none;
	color: var(--adflux-home-accent-dark);
	transform: translateY(-3px);
}

.home .dpm-category-card .dpm-category-icon {
	width: 100%;
	height: auto;
	aspect-ratio: 1 / 1;
	margin-bottom: 0.65rem;
	border: 1px solid rgba(234, 223, 215, 0.72);
	border-radius: 18px;
	background: #fff;
	box-shadow: 0 7px 22px rgba(51, 32, 18, 0.055);
}

.home .dpm-category-icon img {
	width: 100%;
	height: 100%;
	max-width: 100%;
	max-height: 100%;
	padding: clamp(0.65rem, 1.2vw, 1rem);
	box-sizing: border-box;
	object-fit: contain;
	object-position: center;
	transition: transform var(--dpm-transition);
}

.home .dpm-category-card:hover .dpm-category-icon {
	border-color: rgba(255, 122, 26, 0.5);
	box-shadow: 0 12px 28px rgba(51, 32, 18, 0.1);
}

.home .dpm-category-card h3 {
	max-width: 100%;
	color: var(--adflux-home-ink);
	font-size: clamp(0.82rem, 1.2vw, 0.96rem);
	font-weight: 600;
	line-height: 1.3;
}

.home .adflux-product-section ul.products {
	grid-template-columns: repeat(5, minmax(0, 1fr));
	gap: 0.9rem;
	padding: 0;
	margin: 0;
	list-style: none;
}

.home .adflux-product-section {
	border-block: 0;
	background: var(--adflux-home-surface);
}

.home #dpm-featured-products.adflux-product-section {
	border-top: 0;
	background: var(--adflux-home-surface);
}

.home .adflux-product-section .dpm-section-heading {
	display: flex;
	padding-inline: 0;
	align-items: center;
	justify-content: space-between;
	text-align: left;
}

.home .adflux-product-section .dpm-section-heading > div {
	min-width: 0;
	flex: 1;
}

.home .adflux-product-section .dpm-section-heading p {
	max-width: 44rem;
	margin: 0.45rem 0 0;
	text-align: left;
}

.home .adflux-product-section .dpm-section-heading h2 {
	display: inline-flex;
	align-items: center;
}

.home .adflux-product-section .dpm-section-heading h2::after {
	display: none;
}

.home .adflux-product-section .dpm-section-heading > a {
	display: inline-flex;
	flex: 0 0 auto;
	min-height: 36px;
	padding: 0.45rem 0.9rem;
	align-items: center;
	border-radius: 999px;
	background: var(--adflux-home-accent);
	color: #fff;
	font-size: 0.8rem;
	font-weight: 700;
}

.home .woocommerce ul.products li.product {
	position: relative;
	min-width: 0;
	padding: 0.5rem;
	border: 1px solid #ead8ca;
	border-radius: 8px;
	background: #fff;
	box-shadow: 0 6px 20px rgba(93, 58, 32, 0.045);
}

.home .dpm-loop-badges {
	position: absolute;
	top: 0;
	left: -1rem;
	right: -1rem;
	z-index: 2;
	display: flex;
	flex-wrap: nowrap;
	gap: 0.3rem;
	justify-content: space-between;
	pointer-events: none;
}

.home .dpm-loop-badge {
	display: inline-flex;
	min-height: 22px;
	padding: 0.18rem 0.45rem;
	align-items: center;
	border-radius: 7px 0 6px 0;
	background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
	box-shadow: 0 4px 10px rgba(30, 41, 59, 0.14);
	color: #fff;
	font-size: 0.68rem;
	font-weight: 800;
	line-height: 1;
}

.home .dpm-loop-badge:last-child:not(:first-child) {
	border-radius: 0 7px 0 6px;
}

.home .woocommerce ul.products li.product .woocommerce-loop-product__link {
	padding-top: 1.6rem;
}

.home .dpm-loop-badge--sale {
	background: linear-gradient(135deg, #059669 0%, #22c98b 100%);
	box-shadow: 0 4px 10px rgba(5, 150, 105, 0.2);
}

.home .dpm-loop-badge--new {
	background: linear-gradient(135deg, #4338ca 0%, #7c3aed 100%);
	box-shadow: 0 4px 10px rgba(79, 70, 229, 0.2);
}

.home .dpm-loop-badge--backorder {
	background: linear-gradient(135deg, #b45309 0%, #f59e0b 100%);
}

.home .dpm-loop-badge--out-of-stock {
	background: linear-gradient(135deg, #b42318 0%, #e5484d 100%);
}

.home .woocommerce ul.products li.product:hover {
	border-color: var(--adflux-home-accent);
	transform: translateY(-2px);
	box-shadow: 0 10px 28px rgba(51, 32, 18, 0.1);
}

.home .adflux-product-section ul.products li.product {
	height: auto;
	align-self: stretch;
}

.home .adflux-product-section--carousel ul.products {
	display: flex;
	overflow-x: auto;
	overflow-y: hidden;
	gap: 0.9rem;
	overscroll-behavior-inline: contain;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
	touch-action: pan-y;
	cursor: grab;
	user-select: none;
}

.home .adflux-product-section--carousel ul.products.is-dragging {
	scroll-snap-type: none;
	cursor: grabbing;
}

.home .adflux-product-section--carousel ul.products img {
	-webkit-user-drag: none;
}

.home .adflux-product-section--carousel ul.products::-webkit-scrollbar {
	display: none;
}

.home .adflux-product-section--carousel ul.products li.product {
	flex: 0 0 var(--adflux-product-card-width, 220px);
	scroll-snap-align: start;
}

.home .adflux-product-carousel__dots {
	display: flex;
	min-height: 2rem;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	margin-top: 1rem;
}

.home .adflux-product-carousel__dots button {
	width: 0.6rem;
	height: 0.6rem;
	padding: 0;
	border: 1px solid var(--adflux-home-accent);
	border-radius: 50%;
	background: transparent;
	cursor: pointer;
}

.home .adflux-product-carousel__dots button[aria-current="true"] {
	width: 1.15rem;
	border-radius: 999px;
	background: var(--adflux-home-accent);
}

.home .woocommerce ul.products li.product a img {
	width: 100%;
	height: auto;
	margin-bottom: 0.75rem;
	aspect-ratio: 1 / 1;
	border-radius: 4px;
	background: #fff;
	object-fit: contain;
}

.home .woocommerce ul.products li.product .woocommerce-loop-product__title {
	min-height: 2.8em;
	color: var(--adflux-home-ink);
	font-size: 0.92rem;
	font-weight: 600;
	line-height: 1.4;
	overflow-wrap: anywhere;
	text-align: center;
	white-space: normal;
}

.home .woocommerce ul.products li.product .dpm-product-stats {
	justify-content: center;
	flex-wrap: wrap;
	row-gap: 0.25rem;
	margin-top: 0.45rem;
}

.home .woocommerce ul.products li.product .dpm-product-stats--no-sales {
	row-gap: 0;
}

.home .woocommerce ul.products li.product .dpm-product-stats .price {
	width: 100%;
	margin: 0 !important;
	text-align: center;
}

.home .woocommerce ul.products li.product .price {
	color: #d12c74;
	font-size: 1.05rem;
	font-weight: 800;
	text-align: center;
}

.home .woocommerce ul.products li.product .price del {
	display: inline;
	color: #cbaac0;
	font-size: 0.78em;
	font-weight: 500;
}

.home .woocommerce ul.products li.product .button {
	position: static;
	display: inline-flex;
	width: 100%;
	min-height: 40px;
	padding: 0.55rem 0.65rem;
	align-items: center;
	justify-content: center;
	border-radius: 5px;
	margin: 0.4rem 0 0;
	gap: 0.4rem;
	font-size: 0.8rem;
	font-weight: 700;
	line-height: 1.2;
}

.home .woocommerce ul.products li.product .button {
	order: 21;
	border-color: #0b274d;
	background: linear-gradient(135deg, #123b68 0%, #0b274d 100%);
	box-shadow: 0 6px 14px rgba(11, 39, 77, 0.18);
	color: #fff;
}

.home .woocommerce ul.products li.product .button:hover {
	border-color: #071d3a;
	background: #071d3a;
}

.home .woocommerce ul.products li.product .adflux-loop-buy-now {
	order: 22;
	width: 100%;
	margin: 0;
}

.home .woocommerce ul.products li.product .adflux-loop-buy-now .button {
	position: static;
	width: 100%;
	min-height: 40px;
	margin-top: 0.4rem;
	border-color: #f26700;
	background: linear-gradient(135deg, #ff9300 0%, #f26700 100%);
	box-shadow: 0 6px 14px rgba(242, 103, 0, 0.2);
	color: #fff;
	font-size: 0.8rem;
}

.home .woocommerce ul.products li.product .adflux-loop-buy-now .button:hover,
.home .woocommerce ul.products li.product .adflux-loop-buy-now .button:focus-visible {
	border-color: #d95700;
	background: #e85f00;
	box-shadow: 0 8px 18px rgba(232, 95, 0, 0.25);
}

.home .woocommerce ul.products li.product > .button {
	border-color: #0b274d;
	background: linear-gradient(135deg, #123b68 0%, #0b274d 100%);
	box-shadow: 0 6px 14px rgba(11, 39, 77, 0.18);
}

.home .dpm-testimonials {
	background: var(--adflux-home-surface);
}

.home .dpm-testimonial-card {
	border-color: var(--adflux-home-border);
	box-shadow: none;
}

@media (max-width: 1100px) {
	.home .adflux-product-section ul.products {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
}

@media (max-width: 860px) {
	.home .adflux-product-section ul.products {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

@media (max-width: 640px) {
	.home { --adflux-home-section-space: 0.875rem; }

	.home .adflux-banner__slides,
	.home .adflux-banner__slides.has-side-banner {
		display: block;
	}

	.home .adflux-banner__side {
		display: none;
	}

	.home .adflux-product-section .dpm-section-heading {
		align-items: center;
		flex-direction: row;
		gap: 0.75rem;
	}

	.home .adflux-product-section .dpm-section-heading > a {
		padding-inline: 0.7rem;
		white-space: nowrap;
	}

	.home .adflux-category-carousel {
		max-width: min(calc(100% - 4.5rem), var(--dpm-category-viewport-mobile, 100%));
	}

	.home .adflux-banner__viewport {
		width: 100%;
	}

	.home .adflux-banner__viewport.has-side-banner .adflux-banner__controls {
		right: 0;
	}

	.home .adflux-banner__controls {
		height: var(--adflux-banner-mobile-height, 156px);
	}

	.home .adflux-banner__slides,
	.home .adflux-banner__slide,
	.home .adflux-banner__slide a,
	.home .adflux-banner__slide picture {
		height: var(--adflux-banner-mobile-height, 156px);
	}

	.home .adflux-banner__image {
		width: 100%;
		height: 100%;
		aspect-ratio: auto;
		object-fit: contain;
	}

	.home .dpm-section {
		padding-block: var(--adflux-home-section-space);
	}

	.home .dpm-category-grid {
		gap: 0.65rem;
	}

	.home .adflux-category-carousel__control {
		top: calc(50% - 1.25rem);
		bottom: auto;
		width: 1.875rem;
		height: 1.875rem;
		transform: translateY(-50%);
	}

	.home .adflux-category-carousel__control--previous {
		left: min(-2.125rem, max(-4rem, calc((100vw - 100%) / -2 - 0.25rem)));
	}

	.home .adflux-category-carousel__control--next {
		right: min(-2.125rem, max(-4rem, calc((100vw - 100%) / -2 - 0.25rem)));
	}

	.home .dpm-category-card {
		flex-basis: var(--dpm-category-icon-size-mobile, 104px);
		min-width: 0;
	}

	.home .dpm-category-card .dpm-category-icon {
		width: 100%;
		height: auto;
		border-radius: 15px;
	}

	.home .adflux-product-section ul.products {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 0.65rem;
	}

	.home .woocommerce ul.products li.product {
		padding: 0.5rem;
	}

	.home .dpm-loop-badges {
		top: 0;
		left: -1rem;
		right: -1rem;
	}

	.home .woocommerce ul.products li.product .woocommerce-loop-product__title {
		font-size: 0.82rem;
	}
}

@media (prefers-reduced-motion: reduce) {
	.home .dpm-category-card,
	.home .woocommerce ul.products li.product {
		transition: none;
	}
}
