/*
 * Best Sellers grid — [led_bestsellers]
 */

.led-home__bestsellers {
	width: 100%;
}

.led-home__bestsellers .led-home__section-title {
	margin-block: var(--space-6, 1.5rem) var(--space-8, 2rem);
}

.led-home__products {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: var(--space-2, 0.5rem);
	width: 100%;
}

a.led-home__product {
	display: flex;
	flex-direction: column;
	gap: var(--space-2, 0.5rem);
	min-width: 0;
	width: 100%;
	padding: var(--space-2, 0.5rem);
	border: 1px solid var(--color-border, #e2e2e2);
	border-radius: 10px;
	background: var(--color-bg, #fff);
	box-shadow: 0 8px 16px rgb(0 0 0 / 0.1);
	text-decoration: none;
	color: inherit;
	text-align: center;
	overflow: hidden;
	transition: border-color var(--transition-slow, 0.3s ease), box-shadow var(--transition-slow, 0.3s ease);
	box-sizing: border-box;
}

a.led-home__product:hover {
	border-color: var(--color-primary-700, #078a3e);
	box-shadow: 0 8px 16px color-mix(in srgb, var(--color-primary-700, #078a3e) 20%, transparent);
}

.led-home__product-media {
	display: flex;
	align-items: center;
	justify-content: center;
}

.led-home__product-media img {
	display: block;
	width: 75%;
	max-width: 300px;
	height: auto;
	margin: 0 auto;
}

.led-home__product-name {
	margin: 0;
	margin-top: 0 !important;
	margin-bottom: 0 !important;
	min-height: 5rem;
	font-size: var(--font-size-small, 0.75rem) !important;
	font-weight: var(--font-weight-semibold, 600);
	line-height: 1.15;
	text-transform: none;
	letter-spacing: normal;
	font-family: var(--font-family-body, Inter, sans-serif);
}

.led-home__product-meta {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: space-between;
	gap: var(--space-3, 0.75rem);
	margin-top: auto;
	color: var(--color-text-muted, #414141);
}

.led-home__product-price {
	font-family: var(--font-family-price);
	font-size: var(--font-size-price);
	font-weight: var(--font-weight-price, 700);
	line-height: var(--line-height-price);
	letter-spacing: var(--letter-spacing-price);
	text-transform: var(--text-transform-price, none);
	color: var(--color-primary-700, #067338);
	text-align: center;
	width: 100%;
}

.led-home__product-price-regular {
	color: var(--color-text-muted, #565656);
	text-decoration: line-through;
	margin-right: var(--space-1, 0.25rem);
	font-size: 0.75em;
}

.led-home__product-stock {
	display: flex;
	flex-direction: column;
	align-items: center;
	font-size: 0.6875rem;
	line-height: 1.3;
}

.led-home__product-stock strong {
	color: var(--color-text, #111);
}

/* CTA uses .led-btn.green-btn — layout only; tokens live in buttons.css */
a.led-home__product .led-home__product-cta {
	width: 100%;
	max-width: 12rem;
	margin-inline: auto;
	pointer-events: none; /* whole card is the link */
	white-space: normal;
}

.led-home__product-icons {
	display: flex;
	flex-wrap: wrap;
	gap: 3px;
	justify-content: center;
	width: 100%;
	overflow: hidden;
}

.led-home__product-icons img {
	width: 18px;
	height: 18px;
}

.led-home__product-icons img:nth-child(n + 6) {
	display: none;
}

/* Tablet: 3 per row */
@media (min-width: 768px) {
	.led-home__products {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	a.led-home__product {
		padding: var(--space-4, 1rem);
	}

	.led-home__product-name {
		min-height: 3rem;
		font-size: var(--font-size-small, 0.875rem);
	}

	.led-home__product-price {
		font-size: var(--font-size-price-tablet, var(--font-size-price));
	}

	.led-home__product-media img {
		width: 65%;
	}

	.led-home__product-stock {
		font-size: 0.8125rem;
	}

	.led-home__product-icons {
		gap: 4px;
		margin-top: var(--space-2, 0.5rem);
	}

	.led-home__product-icons img {
		width: 28px;
		height: 28px;
	}
}

/* Desktop: 5 per row (6th slot mobile/tablet only) */
@media (min-width: 1024px) {
	.led-home__products {
		grid-template-columns: repeat(5, minmax(0, 1fr));
		gap: var(--space-3, 0.75rem);
	}

	.led-home__products > .led-home__product:nth-child(6),
	.led-home__products > .led-home__product--mobile-only {
		display: none;
	}

	.led-home__product-media img {
		width: 50%;
	}

	.led-home__product-icons {
		gap: 6px;
	}

	.led-home__product-icons img {
		width: 32px;
		height: 32px;
	}

	.led-home__product-icons img:nth-child(6) {
		display: none;
	}
}

/* Price scale matches theme --font-size-price-* (overrides.css / typography) */
@media (min-width: 981px) {
	.led-home__product-price {
		font-size: var(--font-size-price-desktop, var(--font-size-price));
	}
}
