/* Base reset + typography + shared layout primitives. */

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

/* The hidden attribute must always win — several components set display:flex/grid,
   which would otherwise override the UA's [hidden]{display:none}. */
[hidden] {
	display: none !important;
}

html {
	-webkit-text-size-adjust: 100%;
	overflow-x: clip;
}

body.drx-body {
	margin: 0;
	font-family: var(--font-body);
	font-size: 14px;
	line-height: 1.5;
	color: var(--fg-1);
	background: var(--bg-0);
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	/* html{overflow-x:clip} alone does NOT stop nested overflow-x:auto scrollers (shop rails,
	   chip bars) from leaking into document scrollWidth — body-level clip does. */
	overflow-x: clip;
}

img {
	max-width: 100%;
	height: auto;
}

a {
	color: var(--droix-green-deep);
	text-decoration: none;
}

a:hover {
	color: var(--droix-green-dark);
}

button {
	font-family: inherit;
}

h1,
h2,
h3,
h4 {
	font-family: var(--font-ui);
	color: var(--fg-2);
	line-height: 1.25;
	margin: 0;
}

.drx-wrap {
	max-width: var(--wrap-max);
	margin: 0 auto;
	padding-left: var(--wrap-pad);
	padding-right: var(--wrap-pad);
	width: 100%;
}

.drx-main {
	flex: 1;
	display: flex;
	flex-direction: column;
}

.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
}

/* ── Breadcrumb ── */
.drx-crumb {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 7px;
	font-size: 12.5px;
	font-weight: 500;
	color: var(--fg-5);
	margin: 20px 0;
}

.drx-crumb a {
	color: var(--droix-green-dark);
	font-weight: 600;
}

.drx-crumb a:hover {
	color: var(--droix-green-deep);
}

.drx-crumb__sep {
	color: var(--stroke-3);
}

/* ── Section head (title + view-all) ── */
.drx-sect-head {
	display: flex;
	align-items: baseline;
	gap: 16px;
	margin: 0 0 18px;
}

.drx-sect-head__title {
	font-size: 24px;
	font-weight: 700;
}

.drx-sect-head__link {
	margin-left: auto;
	display: inline-flex;
	align-items: center;
	gap: 5px;
	font-size: 13px;
	font-weight: 600;
	white-space: nowrap;
}

/* ── Guide card ── */
.drx-card {
	display: flex;
	flex-direction: column;
	gap: 7px;
	padding: 18px;
	background: var(--bg-0);
	border: 1px solid var(--stroke-1);
	border-radius: var(--r-xl);
	color: inherit;
	transition: box-shadow 0.15s ease, border-color 0.15s ease;
	min-width: 0;
}

.drx-card:hover {
	border-color: var(--stroke-3);
	box-shadow: var(--shadow-md);
	color: inherit;
}

.drx-card__eyebrow {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
	min-height: 18px;
}

.drx-card__device {
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--droix-green-deep);
	background: var(--droix-green-tint);
	border-radius: var(--r-pill);
	padding: 2px 9px;
}

.drx-card__section {
	font-size: 11.5px;
	font-weight: 600;
	color: var(--fg-5);
}

.drx-card__title {
	font-family: var(--font-ui);
	font-size: 15.5px;
	font-weight: 700;
	color: var(--fg-2);
	line-height: 1.3;
}

.drx-card__excerpt {
	font-size: 12.5px;
	line-height: 1.55;
	color: var(--fg-4);
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.drx-card__meta {
	display: flex;
	align-items: center;
	gap: 12px;
	font-size: 11.5px;
	color: var(--fg-5);
	margin-top: auto;
	padding-top: 6px;
}

.drx-card__bm {
	all: unset;
	cursor: pointer;
	margin-left: auto;
	color: var(--fg-5);
	display: inline-flex;
	padding: 4px;
	border-radius: 8px;
}

.drx-card__bm:hover {
	color: var(--fg-2);
	background: var(--bg-3);
}

.drx-card__bm.is-on {
	color: var(--droix-green-dark);
}

.drx-card__bm.is-on svg {
	fill: var(--droix-green);
	stroke: var(--droix-green-dark);
}

/* ── Card grids ── */
.drx-grid {
	display: grid;
	gap: 14px;
}

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

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

@media (max-width: 1024px) {
	.drx-grid--3,
	.drx-grid--4 {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.drx-sect-head__title {
		font-size: 20px;
	}
}

@media (max-width: 640px) {
	.drx-grid--3,
	.drx-grid--4 {
		grid-template-columns: minmax(0, 1fr);
	}
}

/* ── Device grid + card (home finder, category picker, brand archive) ── */
.drx-device-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 20px;
}

.drx-device-card {
	position: relative;
	background: var(--bg-0);
	border: 1px solid var(--stroke-1);
	border-radius: var(--r-xl);
	padding: 20px;
	display: flex;
	flex-direction: column;
	gap: 10px;
	box-shadow: 0 2px 6px rgba(38, 38, 38, 0.04);
	color: inherit;
	transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

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

.drx-device-card__media {
	height: 110px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.drx-device-card__media img {
	max-height: 110px;
	max-width: 100%;
	object-fit: contain;
}

.drx-device-card__ph {
	width: 74px;
	height: 74px;
	border-radius: var(--r-xl);
	background: var(--bg-3);
	color: var(--fg-3);
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.drx-device-card__tx {
	display: flex;
	flex-direction: column;
	gap: 3px;
}

.drx-device-card__brand {
	font-size: 11.5px;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--fg-5);
}

.drx-device-card__tx b {
	font-family: var(--font-ui);
	font-weight: 700;
	font-size: 16px;
	color: var(--fg-2);
}

.drx-device-card__meta {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 12.5px;
	font-weight: 600;
	color: var(--droix-green-dark);
	margin-top: 2px;
}

.drx-device-card__dl {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	color: var(--fg-3);
}
