/* ---------- Каталог ---------- */
/* Цвета — из палитры темы (Внешний вид → Настроить → Цвета): --accent, --contrast-2, --base… */

.sc-catalog__head {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px 24px;
	margin-bottom: 16px;
}

.sc-catalog__title {
	margin: 0;
}

.sc-catalog__head .search-form {
	display: flex;
	flex: 0 1 320px;
	min-width: 0;
	max-width: 100%;
}

/* Поле внутри <label>: сжимается label, иначе поле держит ширину темы (251px)
   и кнопка «Найти» уходит за край экрана на телефоне */
.sc-catalog__head .search-form label {
	flex: 1 1 0;
	min-width: 0;
}

.sc-catalog__head .search-field {
	width: 100%;
	min-width: 0;
	border-color: var(--base);
	background: var(--base-2);
}

.sc-rubrics {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 28px;
	padding-bottom: 20px;
	border-bottom: 1px solid var(--base);
}

.sc-chip {
	padding: 5px 16px;
	border: 1px solid var(--base);
	border-radius: 999px;
	background: var(--base-2);
	color: var(--contrast);
	font-size: 0.9em;
	text-decoration: none;
}

.sc-chip:hover {
	border-color: var(--accent);
	color: var(--accent);
}

.sc-chip.is-active,
.sc-chip.is-active:hover {
	border-color: var(--accent);
	background: var(--accent);
	color: #fff;
}

.sc-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
	gap: 32px 22px;
}

.sc-card {
	display: flex;
	flex-direction: column;
	color: var(--contrast);
	text-decoration: none;
}

.sc-card__img {
	display: flex;
	align-items: center;
	justify-content: center;
	aspect-ratio: 3 / 4;
	margin-bottom: 12px;
	overflow: hidden;
	border-radius: 3px 6px 6px 3px;
	background: var(--base-2);
	box-shadow: 0 2px 6px rgba(60, 40, 20, 0.12);
	transition: transform 0.2s, box-shadow 0.2s;
}

.sc-card:hover .sc-card__img {
	transform: translateY(-3px);
	box-shadow: 0 8px 18px rgba(60, 40, 20, 0.18);
}

.sc-card__img img {
	width: 100%;
	height: 100%;
	object-fit: contain;
}

/* «Обложка» для товара без фото */
.sc-card__noimg {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	padding: 18px 16px 18px 26px;
	background-image: linear-gradient(90deg, rgba(0, 0, 0, 0.18) 0, rgba(0, 0, 0, 0.18) 8px, rgba(255, 255, 255, 0.12) 9px, transparent 12px);
	color: #f6eedd;
	text-align: center;
}

.sc-card__noimg-title {
	padding: 10px 0;
	border-top: 1px solid rgba(246, 238, 221, 0.5);
	border-bottom: 1px solid rgba(246, 238, 221, 0.5);
	font-family: Georgia, "PT Serif", serif;
	font-size: 15px;
	line-height: 1.35;
}

.sc-cover-0 { background-color: #2f4a3a; }
.sc-cover-1 { background-color: #8b3a2f; }
.sc-cover-2 { background-color: #2e4560; }
.sc-cover-3 { background-color: #7a5a2c; }
.sc-cover-4 { background-color: #5a3f5c; }

.sc-card__title {
	font-weight: 600;
	line-height: 1.3;
}

.sc-card:hover .sc-card__title {
	color: var(--accent);
}

.sc-card__author {
	margin-top: 3px;
	color: var(--contrast-2);
	font-size: 0.9em;
}

.sc-card__price {
	margin-top: 6px;
	color: var(--accent);
	font-weight: 700;
}

.sc-empty {
	padding: 40px 0;
	color: var(--contrast-2);
	text-align: center;
}

.sc-catalog .pagination {
	margin-top: 36px;
}

/* ---------- Страница товара ---------- */

.sc-crumbs {
	margin-bottom: 10px;
	color: var(--contrast-3);
	font-size: 0.9em;
}

.sc-crumbs a {
	color: var(--contrast-2);
	text-decoration: none;
}

.sc-crumbs a:hover {
	color: var(--accent);
}

.sc-buy {
	margin-bottom: 24px;
	padding: 22px;
	border-left: 4px solid var(--accent);
	border-radius: 6px;
	background: var(--base-2);
}

.sc-buy.is-sold {
	border-left-color: var(--contrast-3);
}

.sc-buy__price {
	margin: 0 0 14px;
	font-size: 1.9em;
	font-weight: 700;
	line-height: 1.2;
}

/* Кнопка в фирменном цвете Авито — узнаётся сразу */
.sc-buy__btn,
.sc-buy__btn:visited {
	display: inline-block;
	padding: 13px 30px;
	border-radius: 6px;
	background: #00aaff;
	color: #fff;
	font-weight: 600;
	text-decoration: none;
}

.sc-buy__btn:hover,
.sc-buy__btn:focus {
	background: #0090d9;
	color: #fff;
}

.sc-buy__note {
	margin: 12px 0 0;
	color: var(--contrast-2);
	font-size: 0.9em;
}

.sc-buy__sold {
	display: inline-block;
	margin: 0;
	padding: 4px 14px;
	border-radius: 4px;
	background: var(--contrast-2);
	color: #fff;
	font-weight: 700;
	letter-spacing: 0.05em;
	text-transform: uppercase;
}

.sc-details {
	display: grid;
	grid-template-columns: max-content 1fr;
	gap: 8px 24px;
	margin: 0 0 24px;
}

.sc-details dt {
	color: var(--contrast-2);
}

.sc-details dd {
	margin: 0;
}

@media (max-width: 480px) {
	.sc-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 22px 14px;
	}
}
