:root {
	--nmc-books-accent: #e60023;
	--nmc-books-text: #151515;
	--nmc-books-muted: #6c6c6c;
	--nmc-books-border: #e4e4e4;
	--nmc-books-panel: #f6f6f6;
	--nmc-books-star: #ff5a1f;
}

.nmc-books,
.nmc-books * {
	box-sizing: border-box;
}

.nmc-books {
	display: grid;
	grid-template-columns: minmax(190px, 220px) minmax(0, 1fr);
	gap: 26px;
	width: 100%;
	color: var(--nmc-books-text);
}

.nmc-books__sidebar {
	min-width: 0;
}

.nmc-books__filters {
	display: flex;
	flex-direction: column;
	border: 1px solid var(--nmc-books-border);
	background: #fff;
}

.nmc-books__filter,
.nmc-books__filter-heading {
	width: 100%;
	min-height: 46px;
	margin: 0;
	padding: 11px 14px;
	border: 0;
	border-bottom: 1px solid var(--nmc-books-border);
	border-radius: 0;
	background: #fff;
	color: var(--nmc-books-text);
	font: inherit;
	text-align: left;
}

.nmc-books__filter {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	cursor: pointer;
	transition: background-color .2s ease, color .2s ease;
}

.nmc-books__filter:hover,
.nmc-books__filter:focus-visible {
	background: var(--nmc-books-panel);
}

.nmc-books__filter.is-active {
	background: #222;
	color: #fff;
	font-weight: 700;
}

.nmc-books__filter--sale {
	justify-content: flex-start;
	background: var(--nmc-books-accent);
	color: #fff;
	font-weight: 800;
	text-transform: uppercase;
}

.nmc-books__filter--sale:hover,
.nmc-books__filter--sale:focus-visible,
.nmc-books__filter--sale.is-active {
	background: #b9001b;
	color: #fff;
}

.nmc-books__discount {
	display: inline-grid;
	place-items: center;
	width: 23px;
	height: 23px;
	border-radius: 50%;
	background: #fff;
	color: var(--nmc-books-accent);
	font-size: 13px;
	line-height: 1;
}

.nmc-books__filter-heading {
	display: flex;
	align-items: center;
	background: #9a9a9a;
	color: #fff;
	font-size: 13px;
	font-weight: 800;
	letter-spacing: .04em;
}

.nmc-books__term-count {
	opacity: .7;
	font-size: 12px;
}

.nmc-books__content {
	min-width: 0;
}

.nmc-books__header {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 18px;
	margin-bottom: 12px;
}

.nmc-books__title {
	margin: 0;
	padding: 0;
	font-size: clamp(24px, 3vw, 34px);
	line-height: 1.15;
}

.nmc-books__status {
	min-height: 1.2em;
	margin: 4px 0 0;
	color: var(--nmc-books-muted);
	font-size: 13px;
}

.nmc-books__arrows {
	display: flex;
	gap: 8px;
	flex: 0 0 auto;
}

.nmc-books__arrow {
	display: grid;
	place-items: center;
	width: 42px;
	height: 42px;
	margin: 0;
	padding: 0;
	border: 1px solid #cfcfcf;
	border-radius: 50%;
	background: #fff;
	color: #222;
	font-size: 30px;
	line-height: 1;
	cursor: pointer;
	transition: transform .2s ease, background-color .2s ease, opacity .2s ease;
}

.nmc-books__arrow:hover:not(:disabled),
.nmc-books__arrow:focus-visible:not(:disabled) {
	transform: translateY(-2px);
	background: #f2f2f2;
}

.nmc-books__arrow:disabled {
	opacity: .35;
	cursor: not-allowed;
}

.nmc-books__track {
	display: grid;
	grid-auto-flow: column;
	grid-auto-columns: minmax(170px, 22%);
	gap: 22px;
	overflow-x: auto;
	overscroll-behavior-inline: contain;
	padding: 2px 2px 14px;
	scroll-behavior: smooth;
	scroll-snap-type: x mandatory;
	scrollbar-width: thin;
	scrollbar-color: #c9c9c9 transparent;
}

.nmc-books__track::-webkit-scrollbar {
	height: 7px;
}

.nmc-books__track::-webkit-scrollbar-thumb {
	border-radius: 10px;
	background: #c9c9c9;
}

.nmc-book {
	min-width: 0;
	overflow: hidden;
	scroll-snap-align: start;
	background: #fff;
}

.nmc-book[hidden] {
	display: none !important;
}

.nmc-book__cover-link,
.nmc-book__name a {
	color: inherit;
	text-decoration: none;
}

.nmc-book__cover {
	position: relative;
	overflow: hidden;
	aspect-ratio: 2 / 3;
	background: #f0f0f0;
}

.nmc-book__image {
	display: block;
	width: 100%;
	height: 100%;
	margin: 0;
	object-fit: cover;
	transition: transform .3s ease;
}

.nmc-book:hover .nmc-book__image {
	transform: scale(1.025);
}

.nmc-book__badge {
	position: absolute;
	z-index: 2;
	top: 10px;
	left: 10px;
	padding: 5px 8px;
	border-radius: 999px;
	background: var(--nmc-books-accent);
	color: #fff;
	font-size: 11px;
	font-weight: 800;
	letter-spacing: .04em;
}

.nmc-book__body {
	padding-top: 10px;
}

.nmc-book__name {
	display: -webkit-box;
	overflow: hidden;
	min-height: 2.7em;
	margin: 0 0 7px;
	padding: 0;
	font-size: 15px;
	font-weight: 700;
	line-height: 1.35;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
}

.nmc-book__rating {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 5px;
	min-height: 22px;
	font-size: 13px;
}

.nmc-book__stars {
	display: inline-block;
	font-size: 17px;
	line-height: 1;
	letter-spacing: 1px;
}

.nmc-book__stars::before {
	content: "★★★★★";
	background: linear-gradient(
		90deg,
		var(--nmc-books-star) var(--nmc-rating),
		#d4d4d4 var(--nmc-rating)
	);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}

.nmc-book__rating-count,
.nmc-book__no-rating,
.nmc-book__format {
	color: var(--nmc-books-muted);
}

.nmc-book__format {
	margin-top: 3px;
	font-size: 14px;
}

.nmc-book__price {
	min-height: 29px;
	margin-top: 4px;
	font-size: 20px;
	font-weight: 800;
}

.nmc-book__price del {
	margin-right: 5px;
	color: var(--nmc-books-muted);
	font-size: .72em;
	font-weight: 500;
	opacity: .75;
}

.nmc-book__price ins {
	text-decoration: none;
}

.nmc-book__button.button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 40px;
	margin-top: 9px;
	padding: 8px 12px;
	border: 1px solid #222;
	border-radius: 4px;
	background: #222;
	color: #fff;
	font-size: 13px;
	font-weight: 700;
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
	transition: background-color .2s ease, color .2s ease;
}

.nmc-book__button.button:hover,
.nmc-book__button.button:focus-visible {
	background: #fff;
	color: #222;
}

.nmc-books__notice {
	padding: 18px;
	border-left: 4px solid var(--nmc-books-accent);
	background: #f7f7f7;
}

@media (max-width: 980px) {
	.nmc-books {
		grid-template-columns: 1fr;
		gap: 18px;
	}

	.nmc-books__filters {
		flex-direction: row;
		overflow-x: auto;
		border: 0;
		gap: 8px;
		padding-bottom: 6px;
		scrollbar-width: thin;
	}

	.nmc-books__filter,
	.nmc-books__filter-heading {
		flex: 0 0 auto;
		width: auto;
		min-height: 40px;
		border: 1px solid var(--nmc-books-border);
		border-radius: 4px;
		white-space: nowrap;
	}

	.nmc-books__filter-heading {
		display: none;
	}

	.nmc-books__track {
		grid-auto-columns: minmax(180px, 31%);
	}
}

@media (max-width: 600px) {
	.nmc-books__header {
		align-items: center;
	}

	.nmc-books__title {
		font-size: 25px;
	}

	.nmc-books__track {
		grid-auto-columns: minmax(180px, 72%);
		gap: 16px;
	}

	.nmc-books__arrow {
		width: 38px;
		height: 38px;
	}
}
