/**
 * 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: #fffdf9;
	background: #faf8f3;
}

.home .dpm-main {
	background: #faf8f3;
}

.home .dpm-announcement {
	padding-block: 0.35rem;
	background: var(--adflux-home-accent);
	font-size: 0.76rem;
}

.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: sticky;
}

.home .dpm-header-inner {
	min-height: 68px;
	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,
.home .dpm-site-header .dpm-primary-nav a:hover,
.home .dpm-site-header .dpm-primary-nav .current-menu-item > a {
	color: var(--adflux-home-accent);
}

.home .dpm-site-header .dpm-primary-nav a {
	color: #34433f;
	font-size: 0.84rem;
}

.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: clamp(1.5rem, 3vw, 2.75rem);
}

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

.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: 0 0 clamp(0.75rem, 2vw, 1.25rem);
	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__slide {
	overflow: hidden;
	border-radius: 12px;
	background: #f3f4f6;
}

.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: cover;
}

.home .adflux-banner__controls {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	margin-top: 0.75rem;
}

.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;
}

.home .adflux-banner__dots {
	display: flex;
	gap: 0.4rem;
}

.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-top: clamp(1.25rem, 2.5vw, 2rem);
	background: #faf8f3;
}

.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;
}

.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:hover .dpm-category-icon img {
	transform: scale(1.04);
}

.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: 1px solid #f1dfd1;
	background: linear-gradient(180deg, #fff7ef 0%, #fffaf5 100%);
}

.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;
	gap: 0.7rem;
}

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

.home .adflux-product-section .dpm-section-heading h2::before {
	display: inline-block;
	width: 2.4rem;
	height: 2.4rem;
	border-radius: 6px;
	background: var(--adflux-home-accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 10h16v10H4V10Zm-1-4h18v4H3V6Zm9 14V6m0 0H8.5a2.5 2.5 0 1 1 2.5-2.5V6Zm0 0h3.5A2.5 2.5 0 1 0 13 3.5V6Z' fill='none' stroke='%23fff' stroke-width='1.8' stroke-linejoin='round'/%3E%3C/svg%3E") center / 58% 58% no-repeat;
	content: "";
}

.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: 100%;
}

.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;
}

.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%;
	margin-bottom: 0.75rem;
	border-radius: 4px;
	background: #fff;
	object-fit: contain;
}

.home .woocommerce ul.products li.product .woocommerce-loop-product__title {
	display: -webkit-box;
	min-height: 2.8em;
	overflow: hidden;
	color: var(--adflux-home-ink);
	font-size: 0.92rem;
	font-weight: 600;
	line-height: 1.4;
	text-align: center;
	text-overflow: ellipsis;
	white-space: normal;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
}

.home .woocommerce ul.products li.product .dpm-product-stats {
	justify-content: center;
	flex-wrap: wrap;
}

.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,
.home .woocommerce ul.products li.product .dpm-product-view-details {
	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: var(--adflux-home-accent);
	background: var(--adflux-home-accent);
	color: #fff;
}

.home .woocommerce ul.products li.product .button:hover {
	border-color: var(--adflux-home-accent-dark);
	background: var(--adflux-home-accent-dark);
}

.home .woocommerce ul.products li.product .dpm-product-view-details {
	order: 20;
	border-color: rgba(255, 122, 26, 0.55);
	background: #fff7ef;
	color: var(--adflux-home-accent-dark);
}

.home .woocommerce ul.products li.product .dpm-product-view-details:hover {
	border-color: var(--adflux-home-accent);
	background: #ffead7;
	color: var(--adflux-home-accent-dark);
}

.home .woocommerce ul.products li.product .dpm-product-view-details::before {
	width: 14px;
	height: 14px;
	background: currentColor;
	content: "";
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M2.5 12s3.5-6 9.5-6 9.5 6 9.5 6-3.5 6-9.5 6-9.5-6-9.5-6Zm9.5 3a3 3 0 1 0 0-6 3 3 0 0 0 0 6Z' fill='%23000'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M2.5 12s3.5-6 9.5-6 9.5 6 9.5 6-3.5 6-9.5 6-9.5-6-9.5-6Zm9.5 3a3 3 0 1 0 0-6 3 3 0 0 0 0 6Z' fill='%23000'/%3E%3C/svg%3E") center / contain no-repeat;
}

.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: var(--adflux-home-accent-dark);
	background: var(--adflux-home-accent-dark);
	color: #fff;
	font-size: 0.8rem;
}

.home .woocommerce ul.products li.product .adflux-loop-buy-now .button:hover {
	border-color: #c94f00;
	background: #c94f00;
}

.home .woocommerce ul.products li.product > .button {
	border-color: var(--adflux-home-accent);
	background: var(--adflux-home-accent);
	box-shadow: 0 6px 14px rgba(232, 95, 0, 0.16);
}

.home .dpm-testimonials {
	background: #fffaf3;
}

.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-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__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: cover;
	}

	.home .dpm-section {
		padding-block: 1.5rem;
	}

	.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: -2.75rem;
	}

	.home .adflux-category-carousel__control--next {
		right: -2.75rem;
	}

	.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 (max-width: 360px) {
	.home .adflux-category-carousel__control--previous { left: -2.5rem; }
	.home .adflux-category-carousel__control--next { right: -2.5rem; }
}

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