/* Category page (kb_category / kb_brand / kb_learn archives) + shared guide-card grids. */

.drx-cathead {
	display: flex;
	align-items: center;
	gap: 20px;
	margin: 4px 0 8px;
}

.drx-cathead__ic {
	width: 64px;
	height: 64px;
	border-radius: var(--r-xl);
	background: var(--droix-green-tint);
	color: var(--droix-green-deep);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
}

.drx-cathead__tx h1 {
	font-size: 36px;
	font-weight: 700;
}

.drx-cathead__tx p {
	margin: 4px 0 0;
	font-size: 14.5px;
	line-height: 1.6;
	color: var(--fg-3);
	max-width: 680px;
}

.drx-cathead__count {
	margin-left: auto;
	padding: 8px 16px;
	border-radius: var(--r-pill);
	background: var(--bg-3);
	font-size: 13.5px;
	color: var(--fg-3);
	white-space: nowrap;
}

.drx-cat-sect {
	padding-top: 44px;
}

.drx-device-card__desc {
	font-size: 12.5px;
	line-height: 1.5;
	color: var(--fg-3);
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* Popular-in panel */
.drx-catpop {
	background: var(--bg-2);
	border-radius: var(--r-2xl);
	padding: 32px 36px;
}

.drx-catpop__title {
	font-size: 22px;
	font-weight: 700;
	margin-bottom: 14px;
}

.drx-catpop__grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 4px 28px;
}

.drx-catpop__row {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 11px 12px;
	border-radius: 14px;
	color: inherit;
}

.drx-catpop__row:hover {
	background: var(--bg-0);
	color: inherit;
}

.drx-catpop__ic {
	color: var(--droix-green-dark);
	flex: 0 0 auto;
	display: inline-flex;
}

.drx-catpop__tx {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.drx-catpop__tx b {
	font-size: 13.5px;
	font-weight: 600;
	line-height: 1.35;
	color: var(--fg-2);
}

.drx-catpop__tx span {
	font-size: 11.5px;
	color: var(--fg-5);
}

/* Shop rail — style the plugin's .drx-product cards up to the design */
.drx-shop-rail .drx-products-rail {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 20px;
	overflow: visible;
	padding: 0;
}

.drx-shop-rail .drx-product--card {
	max-width: none;
	display: flex;
	flex-direction: column;
	transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

.drx-shop-rail .drx-product--card:hover {
	border-color: var(--droix-green);
	box-shadow: 0 8px 24px rgba(17, 24, 39, 0.08);
}

.drx-shop-rail .drx-product__image {
	height: 110px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.drx-shop-rail .drx-product__image img {
	max-height: 110px;
	object-fit: contain;
}

.drx-shop-rail .drx-product__cta {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: 40px;
	border-radius: 14px;
	margin-top: 10px;
	background: var(--droix-green-tint);
	color: var(--droix-green-deep);
	box-shadow: none;
	font-weight: 600;
}

.drx-shop-rail .drx-product__cta:hover {
	background: var(--droix-green);
	color: #fff;
}

/* ── Category "Browse by brand" grid (logo + name + in-category guide count) ── */
.drx-brand-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 16px;
}

.drx-brand-tile {
	display: flex;
	align-items: center;
	gap: 14px;
	background: var(--bg-0);
	border: 1px solid var(--stroke-1);
	border-radius: var(--r-xl);
	padding: 16px 18px;
	color: inherit;
	box-shadow: 0 2px 6px rgba(38, 38, 38, 0.04);
	transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

.drx-brand-tile:hover {
	box-shadow: 0 8px 24px rgba(17, 24, 39, 0.08);
	border-color: var(--droix-green);
	color: inherit;
}

.drx-brand-tile__logo {
	width: 72px;
	height: 44px;
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: var(--r-lg, 12px);
	background: var(--bg-3);
	overflow: hidden;
}

.drx-brand-tile__logo img {
	max-width: 58px;
	max-height: 30px;
	object-fit: contain;
}

.drx-brand-tile__logo--text {
	font-family: var(--font-head);
	font-weight: 700;
	font-size: 12px;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--fg-3);
	padding: 0 6px;
	text-align: center;
	line-height: 1.15;
}

.drx-brand-tile__tx {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.drx-brand-tile__tx b {
	font-family: var(--font-ui);
	font-weight: 700;
	font-size: 15.5px;
	color: var(--fg-2);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.drx-brand-tile__tx span {
	font-size: 12.5px;
	font-weight: 600;
	color: var(--droix-green-dark);
}

.drx-brand-tile__chev {
	margin-left: auto;
	color: var(--fg-5);
	flex: 0 0 auto;
}

/* Brands whose only logo artwork is white-on-dark (AOKZOE) or has a baked black
   background (ONEXPLAYER) get a dark chip so the mark stays legible. */
.drx-brand-tile__logo[data-brand="aokzoe"],
.drx-brand-tile__logo[data-brand="onexplayer"],
.drx-cathead__ic--logo[data-brand="aokzoe"],
.drx-cathead__ic--logo[data-brand="onexplayer"] {
	background: #17181c;
}

/* Brand-archive header logo */
.drx-cathead__ic--logo {
	background: var(--bg-3);
}

.drx-cathead__ic--logo img {
	max-width: 44px;
	max-height: 32px;
	object-fit: contain;
}

/* Responsive */
@media (max-width: 1024px) {
	.drx-brand-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 12px;
	}

	.drx-cathead__ic {
		width: 56px;
		height: 56px;
	}

	.drx-cathead__tx h1 {
		font-size: 28px;
	}

	.drx-cathead__count {
		display: none;
	}

	.drx-device-card__desc {
		display: none;
	}

	.drx-device-grid {
		grid-template-columns: repeat(3, 1fr);
		gap: 14px;
	}

	.drx-catpop {
		border-radius: 24px;
	}

	.drx-shop-rail .drx-products-rail {
		grid-template-columns: 1fr 1fr;
		gap: 14px;
	}
}

@media (max-width: 640px) {
	.drx-cathead {
		flex-wrap: wrap;
		gap: 12px;
	}

	.drx-cathead__ic {
		width: 48px;
		height: 48px;
		border-radius: 15px;
	}

	.drx-cathead__tx h1 {
		font-size: 23px;
	}

	.drx-device-grid {
		grid-template-columns: 1fr 1fr;
		gap: 10px;
	}

	.drx-brand-grid {
		grid-template-columns: 1fr;
		gap: 10px;
	}

	.drx-catpop {
		border-radius: 22px;
		padding: 22px 18px;
	}

	.drx-catpop__grid {
		grid-template-columns: 1fr;
	}

	.drx-shop-rail .drx-products-rail {
		display: flex;
		overflow-x: auto;
		scrollbar-width: none;
		padding-bottom: 8px;
	}

	.drx-shop-rail .drx-product--card {
		flex: 0 0 196px;
	}

	.drx-cat-sect {
		padding-top: 36px;
	}
}
