/**
 * Dynamic home: hero split + category sections (loads after frontend.css).
 */

.crbd-home-dynamic {
	max-width: 1120px;
	margin-left: auto;
	margin-right: auto;
	padding-bottom: 2.5rem;
}

/* Featured hero */
.crbd-home-hero {
	background: linear-gradient(135deg, #0c1222 0%, #1e293b 100%);
	color: #f8fafc;
	padding: clamp(2rem, 5vw, 3.25rem) clamp(1rem, 4vw, 2rem);
	border-radius: 14px;
	margin-bottom: clamp(2rem, 4vw, 3rem);
	overflow: hidden;
}

.crbd-home-hero__inner {
	display: grid;
	gap: clamp(1.5rem, 4vw, 2.5rem);
	align-items: center;
}

@media (min-width: 900px) {
	.crbd-home-hero__inner {
		grid-template-columns: minmax(0, 1fr) minmax(260px, 44%);
	}
}

.crbd-home-hero__kicker {
	margin: 0 0 0.5rem;
	font-size: 0.75rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	color: #94a3b8;
}

.crbd-home-hero__title {
	margin: 0 0 0.75rem;
	font-size: clamp(1.65rem, 3.5vw, 2.35rem);
	font-weight: 800;
	line-height: 1.12;
	letter-spacing: -0.03em;
	color: #fff;
}

.crbd-home-hero__excerpt {
	margin: 0 0 1rem;
	font-size: 1.05rem;
	line-height: 1.6;
	color: #cbd5e1;
	max-width: 38rem;
}

.crbd-home-prices {
	margin: 0 0 1rem;
	font-size: 0.98rem;
	color: #e2e8f0;
}

.crbd-home-hero .crbd-home-prices {
	margin-bottom: 1.15rem;
}

.crbd-home-price-line {
	margin: 0.25rem 0;
}

.crbd-home-hero__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.65rem;
}

.crbd-home-hero__figure {
	border-radius: 12px;
	overflow: hidden;
	background: rgba(255, 255, 255, 0.06);
	line-height: 0;
	box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}

.crbd-home-hero__figure--placeholder {
	min-height: 220px;
	aspect-ratio: 4 / 3;
}

.crbd-home-hero__img {
	width: 100%;
	height: auto;
	display: block;
	vertical-align: middle;
}

/* Sections */
.crbd-home-section {
	margin-bottom: clamp(2rem, 4vw, 3rem);
}

.crbd-home-section__header {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: 0.75rem 1.25rem;
	margin-bottom: 1.25rem;
	padding-bottom: 0.85rem;
	border-bottom: 1px solid #e5e5e5;
}

.crbd-home-section__title {
	margin: 0;
	font-size: clamp(1.35rem, 2.2vw, 1.75rem);
	font-weight: 700;
	color: #1a1a1a;
}

.crbd-home-section__browse {
	font-weight: 600;
	font-size: 0.95rem;
	text-decoration: none;
	color: #2563eb;
}

.crbd-home-section__browse:hover {
	text-decoration: underline;
}

/* Category product grid: 3 columns, priority order = query + PHP sort */
ul.crbd-home-product-grid {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 1.25rem;
	grid-template-columns: 1fr;
}

@media (min-width: 600px) {
	ul.crbd-home-product-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 1.35rem;
	}
}

@media (min-width: 960px) {
	ul.crbd-home-product-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 1.5rem;
	}
}

.crbd-home-product-card {
	margin: 0;
	min-width: 0;
}

.crbd-home-card {
	display: flex;
	flex-direction: column;
	height: 100%;
	background: #fff;
	border: 1px solid rgba(15, 23, 42, 0.08);
	border-radius: 14px;
	overflow: hidden;
	box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 4px 20px rgba(15, 23, 42, 0.06);
	transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.crbd-home-card:hover {
	transform: translateY(-3px);
	box-shadow: 0 8px 28px rgba(15, 23, 42, 0.1), 0 2px 8px rgba(15, 23, 42, 0.06);
	border-color: rgba(37, 99, 235, 0.2);
}

/* Image area: fixed box; photo scales down with contain (no edge cropping) */
.crbd-home-card__media {
	position: relative;
	background: linear-gradient(160deg, #f8fafc 0%, #e2e8f0 100%);
	aspect-ratio: 4 / 3;
	max-height: 168px;
	min-height: 132px;
}

@media (min-width: 600px) {
	.crbd-home-card__media {
		max-height: 156px;
		min-height: 124px;
	}
}

.crbd-home-card__thumb-link {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	min-height: 0;
	padding: 0.55rem 0.65rem;
	box-sizing: border-box;
	line-height: 0;
	outline: none;
}

.crbd-home-card__thumb-link:focus-visible {
	box-shadow: inset 0 0 0 3px rgba(37, 99, 235, 0.45);
	border-radius: 0;
}

.crbd-home-card__img {
	display: block;
	max-width: 100%;
	max-height: 100%;
	width: auto;
	height: auto;
	object-fit: contain;
	object-position: center center;
}

.crbd-home-card__placeholder {
	display: block;
	width: 100%;
	height: 100%;
	min-height: 8rem;
	background: linear-gradient(135deg, #e2e8f0, #cbd5e1);
}

.crbd-home-card__body {
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
	padding: 1rem 1.1rem 1.2rem;
	gap: 0.5rem;
	min-height: 0;
}

.crbd-home-card__title {
	margin: 0;
	font-size: 0.98rem;
	font-weight: 700;
	line-height: 1.35;
	letter-spacing: -0.02em;
	color: #0f172a;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.crbd-home-card__title a {
	color: inherit;
	text-decoration: none;
	transition: color 0.15s ease;
}

.crbd-home-card__title a:hover {
	color: #2563eb;
}

.crbd-home-card__excerpt {
	margin: 0;
	font-size: 0.8125rem;
	line-height: 1.5;
	color: #64748b;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
	flex-shrink: 0;
}

/* Compact price row for cards */
.crbd-home-prices--card {
	margin: 0.15rem 0 0.35rem;
	display: flex;
	flex-wrap: wrap;
	gap: 0.45rem 0.65rem;
}

.crbd-home-prices--card .crbd-home-price-line {
	margin: 0;
	font-size: 0.78rem;
	line-height: 1.3;
	color: #334155;
	padding: 0.28rem 0.55rem;
	background: #f8fafc;
	border-radius: 6px;
	border: 1px solid #e2e8f0;
}

.crbd-home-prices--card .crbd-home-price-line strong {
	font-weight: 700;
	color: #0f172a;
	margin-right: 0.25rem;
}

.crbd-home-card__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.45rem;
	margin-top: auto;
	padding-top: 0.65rem;
}

.crbd-home-card__actions .crbd-btn {
	flex: 1 1 auto;
	min-width: calc(50% - 0.25rem);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0.5rem 0.65rem;
	border-radius: 8px;
	font-size: 0.8125rem;
	font-weight: 600;
	text-decoration: none;
	text-align: center;
	border: 0;
	cursor: pointer;
	line-height: 1.25;
	transition: filter 0.15s ease, transform 0.1s ease;
}

.crbd-home-card__actions .crbd-btn:active {
	transform: scale(0.98);
}

.crbd-home-card__actions .crbd-btn--amazon {
	background: #ff9900;
	color: #111;
}

.crbd-home-card__actions .crbd-btn--flipkart {
	background: #2874f0;
	color: #fff;
}

.crbd-home-card__actions .crbd-btn--details {
	background: #1e293b;
	color: #fff;
}

.crbd-home-card__actions .crbd-btn:focus-visible {
	outline: 2px solid #2563eb;
	outline-offset: 2px;
}

/* Single full-width CTA when only one button wraps */
.crbd-home-card__actions .crbd-btn:only-child {
	min-width: 100%;
}

.crbd-home-hero .crbd-btn {
	display: inline-block;
	padding: 0.55rem 1.1rem;
	border-radius: 999px;
	font-size: 0.95rem;
	font-weight: 600;
	text-decoration: none;
	text-align: center;
	border: 0;
	cursor: pointer;
}

.crbd-home-hero .crbd-btn--amazon {
	background: #ff9900;
	color: #111;
}

.crbd-home-hero .crbd-btn--flipkart {
	background: #2874f0;
	color: #fff;
}

.crbd-home-hero .crbd-btn--details {
	background: #f1f5f9;
	color: #0f172a;
}

.crbd-home-empty {
	margin: 0;
	padding: 1rem 1.15rem;
	background: #f8fafc;
	border: 1px dashed #cbd5e1;
	border-radius: 8px;
	color: #475569;
	font-size: 0.95rem;
}

.crbd-home-empty--hero {
	margin-bottom: 1.5rem;
}
