/* ApnaTech Home Builder Pro — Frontend Styles */

.apnatech-hb {
	--apnatech-bg: #f5f6fb;
	--apnatech-card-bg: #ffffff;
	--apnatech-primary: #ff5a1f;
	--apnatech-accent: #7c3aed;
	--apnatech-text: #14142b;
	--apnatech-muted: #6b7280;
	--apnatech-button: #111827;
	--apnatech-heading-size: 34px;
	--apnatech-title-size: 15px;
	--apnatech-body-size: 13px;
	--apnatech-font-weight: 700;
	--apnatech-card-radius: 20px;
	--apnatech-image-radius: 16px;
	--apnatech-card-padding: 12px;
	--apnatech-card-shadow: 0 8px 24px rgba(20,20,43,0.10);
	--apnatech-card-border: none;
	--apnatech-gap: 16px;
	--apnatech-columns-desktop: 2;
	--apnatech-image-aspect: 1/1;
	--apnatech-button-radius: 999px;

	background: var(--apnatech-bg);
	color: var(--apnatech-text);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	padding: 20px 16px 48px;
	border-radius: 24px;
	box-sizing: border-box;
	overflow: hidden;
}

.apnatech-hb *,
.apnatech-hb *::before,
.apnatech-hb *::after {
	box-sizing: border-box;
}

.apnatech-hb img {
	max-width: 100%;
	display: block;
}

/* ---------- Hero ---------- */

.apnatech-hero {
	text-align: center;
	padding: 12px 4px 20px;
}

.apnatech-hero__heading {
	margin: 0 0 6px;
	font-size: var(--apnatech-heading-size);
	line-height: 1.1;
	font-weight: 800;
	letter-spacing: -0.02em;
	color: var(--apnatech-text);
}

.apnatech-hero__brand {
	display: block;
	background: linear-gradient(90deg, var(--apnatech-primary), var(--apnatech-accent));
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
	color: var(--apnatech-accent);
}

.apnatech-hero__subtitle {
	margin: 8px auto 0;
	max-width: 420px;
	font-size: 14px;
	color: var(--apnatech-muted);
	font-weight: 500;
}

.apnatech-search {
	position: relative;
	max-width: 480px;
	margin: 20px auto 0;
	width: 100%;
}

.apnatech-search__icon {
	position: absolute;
	left: 18px;
	top: 50%;
	transform: translateY(-50%);
	color: var(--apnatech-muted);
	pointer-events: none;
}

.apnatech-search__input {
	width: 100%;
	appearance: none;
	border: none;
	outline: none;
	background: var(--apnatech-card-bg);
	border-radius: 999px;
	padding: 15px 18px 15px 48px;
	font-size: 15px;
	font-weight: 500;
	color: var(--apnatech-text);
	box-shadow: 0 6px 20px rgba(20,20,43,0.08);
	transition: box-shadow 0.2s ease, transform 0.15s ease;
}

.apnatech-search__input::placeholder {
	color: var(--apnatech-muted);
	font-weight: 500;
}

.apnatech-search__input:focus {
	box-shadow: 0 0 0 3px rgba(124,58,237,0.25), 0 8px 24px rgba(20,20,43,0.12);
}

/* ---------- Category pills ---------- */

.apnatech-categories {
	margin: 22px 0 6px;
}

.apnatech-categories__list {
	display: flex;
	gap: 10px;
	list-style: none;
	margin: 0;
	padding: 4px 2px 10px;
	overflow-x: auto;
	scrollbar-width: none;
	-ms-overflow-style: none;
	scroll-snap-type: x proximity;
}

.apnatech-categories__list::-webkit-scrollbar {
	display: none;
}

.apnatech-categories__list li {
	flex: 0 0 auto;
	scroll-snap-align: start;
}

.apnatech-pill {
	appearance: none;
	border: none;
	cursor: pointer;
	white-space: nowrap;
	padding: 10px 18px;
	border-radius: 999px;
	background: var(--apnatech-card-bg);
	color: var(--apnatech-text);
	font-size: 13.5px;
	font-weight: 600;
	box-shadow: 0 2px 10px rgba(20,20,43,0.06);
	transition: transform 0.15s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.apnatech-pill:hover {
	transform: translateY(-2px);
}

.apnatech-pill:active {
	transform: translateY(0) scale(0.97);
}

.apnatech-pill.is-active {
	background: var(--apnatech-text);
	color: #fff;
	box-shadow: 0 8px 20px rgba(20,20,43,0.18);
}

/* ---------- Section title ---------- */

.apnatech-section-title {
	font-size: 19px;
	font-weight: 800;
	margin: 24px 2px 14px;
	letter-spacing: -0.01em;
}

/* ---------- Product grid ---------- */

.apnatech-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: var(--apnatech-gap);
}

.apnatech-card {
	background: var(--apnatech-card-bg);
	border-radius: var(--apnatech-card-radius);
	padding: var(--apnatech-card-padding);
	box-shadow: var(--apnatech-card-shadow);
	border: var(--apnatech-card-border);
	transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
	display: flex;
	flex-direction: column;
}

.apnatech-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 16px 34px rgba(20,20,43,0.16);
}

.apnatech-card.is-hidden {
	display: none;
}

.apnatech-card__image-wrap {
	position: relative;
	border-radius: var(--apnatech-image-radius);
	overflow: hidden;
	background: #f0f1f6;
	aspect-ratio: var(--apnatech-image-aspect);
}

.apnatech-card__image {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.35s ease;
}

.apnatech-card:hover .apnatech-card__image {
	transform: scale(1.06);
}

.apnatech-badge {
	position: absolute;
	top: 10px;
	left: 10px;
	z-index: 2;
	background: rgba(255,255,255,0.92);
	backdrop-filter: blur(4px);
	color: var(--apnatech-text);
	font-size: 10.5px;
	font-weight: 800;
	padding: 5px 10px;
	border-radius: 999px;
	letter-spacing: 0.01em;
	box-shadow: 0 2px 8px rgba(20,20,43,0.1);
}

.apnatech-card__body {
	padding-top: 10px;
	display: flex;
	flex-direction: column;
	flex: 1;
}

.apnatech-card__title {
	font-size: var(--apnatech-title-size);
	font-weight: var(--apnatech-font-weight);
	margin: 0 0 4px;
	line-height: 1.3;
	color: var(--apnatech-text);
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.apnatech-card__desc {
	font-size: var(--apnatech-body-size);
	color: var(--apnatech-muted);
	margin: 0 0 10px;
	line-height: 1.4;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.apnatech-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	text-decoration: none;
	cursor: pointer;
	font-weight: 700;
	transition: transform 0.15s ease, opacity 0.2s ease, box-shadow 0.2s ease;
	border: none;
}

.apnatech-btn:hover {
	transform: translateY(-2px);
	opacity: 0.94;
}

.apnatech-btn:active {
	transform: translateY(0) scale(0.98);
}

.apnatech-btn--card {
	margin-top: auto;
	width: 100%;
	background: var(--apnatech-button);
	color: #fff;
	font-size: 12.5px;
	padding: 10px 12px;
	border-radius: var(--apnatech-button-radius);
	box-shadow: 0 6px 16px rgba(17,24,39,0.22);
}

.apnatech-empty-state {
	text-align: center;
	color: var(--apnatech-muted);
	font-size: 14px;
	font-weight: 600;
	padding: 40px 12px;
}

/* ---------- Featured ---------- */

.apnatech-featured {
	margin-top: 30px;
	background: linear-gradient(160deg, #191932, #100f22);
	border-radius: calc(var(--apnatech-card-radius) + 6px);
	overflow: hidden;
	color: #fff;
	box-shadow: 0 20px 44px rgba(15,15,35,0.28);
}

.apnatech-featured__image-wrap {
	position: relative;
	aspect-ratio: 16/10;
	background: #0f0f22;
}

.apnatech-featured__image {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.apnatech-badge--featured {
	background: rgba(255,255,255,0.15);
	color: #fff;
	backdrop-filter: blur(6px);
}

.apnatech-featured__body {
	padding: 20px;
}

.apnatech-featured__title {
	font-size: 21px;
	font-weight: 800;
	margin: 0 0 8px;
	letter-spacing: -0.01em;
}

.apnatech-featured__desc {
	font-size: 14px;
	color: rgba(255,255,255,0.72);
	margin: 0 0 18px;
	line-height: 1.5;
}

.apnatech-btn--featured {
	background: linear-gradient(90deg, var(--apnatech-primary), var(--apnatech-accent));
	color: #fff;
	font-size: 14px;
	padding: 13px 26px;
	border-radius: var(--apnatech-button-radius);
	box-shadow: 0 10px 24px rgba(124,58,237,0.35);
}

/* ---------- CTA ---------- */

.apnatech-cta {
	margin-top: 34px;
	text-align: center;
	padding: 36px 20px;
	border-radius: calc(var(--apnatech-card-radius) + 6px);
	background: var(--apnatech-card-bg);
	box-shadow: 0 10px 28px rgba(20,20,43,0.08);
}

.apnatech-cta__heading {
	font-size: 22px;
	font-weight: 800;
	margin: 0 0 8px;
	letter-spacing: -0.01em;
}

.apnatech-cta__subtitle {
	font-size: 14px;
	color: var(--apnatech-muted);
	margin: 0 0 20px;
}

.apnatech-btn--cta {
	background: var(--apnatech-text);
	color: #fff;
	font-size: 14.5px;
	padding: 14px 30px;
	border-radius: var(--apnatech-button-radius);
	box-shadow: 0 10px 24px rgba(20,20,43,0.22);
}

/* ---------- Tablet ---------- */

@media (min-width: 600px) {
	.apnatech-hb {
		padding: 28px 24px 56px;
	}

	.apnatech-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

/* ---------- Desktop ---------- */

@media (min-width: 900px) {
	.apnatech-hb {
		padding: 40px 40px 64px;
	}

	.apnatech-hero__heading {
		font-size: calc(var(--apnatech-heading-size) * 1.3);
	}

	.apnatech-grid {
		grid-template-columns: repeat(var(--apnatech-columns-desktop), minmax(0, 1fr));
	}

	.apnatech-featured {
		display: grid;
		grid-template-columns: 1.1fr 1fr;
		align-items: stretch;
	}

	.apnatech-featured__image-wrap {
		aspect-ratio: auto;
		height: 100%;
	}

	.apnatech-featured__body {
		padding: 40px;
		display: flex;
		flex-direction: column;
		justify-content: center;
	}
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
	.apnatech-hb * {
		transition: none !important;
	}
}
