* {
	box-sizing: border-box;
}

:root {
	--page-bg: #f4f6f8;
	--surface: #ffffff;
	--header-bg: #14202d;
	--text: #18212b;
	--muted: #66727d;
	--border: #e8edf1;
	--input-border: #ccd3da;
	--accent: #1769aa;
	--accent-hover: #12578e;
	--placeholder-bg: #e9edf0;
	--shadow: 0 2px 12px rgb(0 0 0 / 7%);
	--radius: 12px;
}

body {
	margin: 0;
	background: var(--page-bg);
	color: var(--text);
	font-family: Arial, sans-serif;
	line-height: 1.4;
}

.site-header {
	padding: 28px max(20px, calc((100% - 1200px) / 2));
	background: var(--header-bg);
	color: #ffffff;
}

.site-header h1 {
	margin: 0 0 6px;
	font-size: clamp(24px, 4vw, 34px);
}

.site-header p {
	margin: 0;
	color: #d8e1e8;
}

.container {
	max-width: 1200px;
	margin: 24px auto;
	padding: 0 20px;
}

.filters {
	display: flex;
	align-items: center;
	gap: 20px;
	margin-bottom: 18px;
}

.filters>label:first-child {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
}

.filters>input {
	width: 100%;
	padding: 12px 14px;
	border: 1px solid var(--input-border);
	border-radius: 8px;
	background: var(--surface);
	color: var(--text);
	font-size: 16px;
}

.filters>input:focus {
	outline: 3px solid rgb(23 105 170 / 20%);
	border-color: var(--accent);
}

.stock-filter {
	display: flex;
	align-items: center;
	gap: 8px;
	white-space: nowrap;
	cursor: pointer;
}

.stock-filter input {
	width: 16px;
	height: 16px;
	accent-color: var(--accent);
}

.table {
	overflow: auto;
	background: var(--surface);
	border-radius: var(--radius);
	box-shadow: var(--shadow);
}

.row {
	display: grid;
	grid-template-columns:
		minmax(130px, 1.2fr) minmax(100px, 1fr) 100px 100px minmax(160px, 1.5fr) 100px 120px;
	gap: 12px;
	min-width: 850px;
	padding: 12px 16px;
	border-bottom: 1px solid var(--border);
	align-items: center;
}

.row:last-child {
	border-bottom: 0;
}

.head {
	background: #eef2f5;
	font-weight: 700;
}

.photo {
	display: block;
	width: 72px;
	height: 54px;
	border-radius: 6px;
	background: var(--placeholder-bg);
	object-fit: cover;
}

.empty-photo {
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--muted);
	font-size: 11px;
	text-align: center;
}

.links a {
	display: inline-block;
	margin: 2px 4px 2px 0;
	padding: 7px 9px;
	border-radius: 6px;
	background: var(--accent);
	color: #ffffff;
	font-size: 13px;
	text-decoration: none;
	transition: background-color 0.2s ease;
}

.links a:hover {
	background: var(--accent-hover);
}

.links a:focus-visible {
	outline: 3px solid rgb(23 105 170 / 30%);
	outline-offset: 2px;
}

.empty {
	padding: 30px;
	color: var(--muted);
	text-align: center;
}

@media (max-width: 700px) {
	.container {
		margin-top: 18px;
		padding: 0 12px;
	}

	.filters {
		display: block;
	}

	.stock-filter {
		margin-top: 10px;
	}

	.table {
		overflow: visible;
		background: transparent;
		box-shadow: none;
	}

	.row {
		display: grid;
		grid-template-columns: 1fr;
		min-width: 0;
		gap: 14px;
		margin-bottom: 12px;
		padding: 16px;
		border: 0;
		border-radius: var(--radius);
		background: var(--surface);
		box-shadow: var(--shadow);
	}

	.head {
		display: none;
	}

	.row>div::before {
		display: block;
		margin-bottom: 3px;
		color: var(--muted);
		font-size: 12px;
		font-weight: 700;
	}

	.row>div:nth-child(1)::before {
		content: 'Модель';
	}

	.row>div:nth-child(2)::before {
		content: 'Код';
	}

	.row>div:nth-child(3)::before {
		content: 'Фото';
	}

	.row>div:nth-child(4)::before {
		content: 'Цена';
	}

	.row>div:nth-child(5)::before {
		content: 'Название';
	}

	.row>div:nth-child(6)::before {
		content: 'В наличии';
	}

	.row>div:nth-child(7)::before {
		content: 'Ссылки';
	}
}

@media (prefers-reduced-motion: reduce) {

	*,
	*::before,
	*::after {
		scroll-behavior: auto !important;
		transition: none !important;
	}
}