/* Каталог: шапка раздела, фильтры, сетка 4/2, баннер, «показать ещё» */
.catalog { padding: 60px 0 60px; display: flex; flex-direction: column; gap: 20px; }
.catalog__head { display: flex; flex-direction: column; gap: 40px; }
.catalog__intro { display: flex; flex-direction: column; gap: 20px; text-align: center; }
.catalog__desc { max-width: 700px; margin-inline: auto; }
.catalog__tools { display: flex; flex-direction: column; gap: 40px; }
.catalog__divider-m { display: none; }

.catalog__grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	column-gap: 10px;
	row-gap: 40px;
	padding-inline: var(--gutter);
	max-width: var(--page-max);
	width: 100%;
	margin-inline: auto;
}

/* ---------- Фильтры ---------- */
.filters { display: flex; flex-direction: column; gap: 20px; }
.filters__bar { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.filters__left { display: flex; align-items: center; gap: 20px; position: relative; }
.filters__toggle-label { display: none; }
.filters__toggle-close { display: none; }

.filters__panel { display: flex; align-items: center; gap: 12px; }
.f-group { position: relative; }
.f-group__btn {
	display: flex; align-items: center;
	padding: 12px;
	border: 1px solid var(--c-line); border-radius: 2px;
	font-size: 14px; line-height: 1.4; letter-spacing: -.02em; color: var(--c-charcoal-500);
	transition: background var(--t) var(--ease), color var(--t) var(--ease);
}
.f-group__btn:hover { border-color: var(--c-charcoal-500); }
.f-group.is-active .f-group__btn,
.f-group.is-open .f-group__btn { background: var(--c-black); color: var(--c-white); }

.f-group__pop {
	position: absolute; left: 0; top: calc(100% + 20px); z-index: 20;
	width: 420px;
	display: none; flex-direction: column; gap: 20px;
	padding: 20px;
	border-radius: 8px;
	background: var(--c-white);
	filter: drop-shadow(0 4px 25px rgba(160, 160, 160, .25));
}
.f-group.is-open .f-group__pop { display: flex; }
.f-group__title {
	display: flex; align-items: center; justify-content: space-between; width: 100%;
	font-weight: 500; font-size: 14px; line-height: normal; letter-spacing: -.01em; color: var(--c-charcoal-500);
	text-align: left;
}
.f-group__title .plus { display: none; }
.f-group__title--acc { pointer-events: none; }

.f-price { display: flex; gap: 12px; }
.f-input {
	flex: 1 1 0; min-width: 0;
	padding: 12px;
	border: 1px solid rgba(85, 84, 80, .2); border-radius: 4px;
	background: var(--c-white);
	font-size: 14px; line-height: 1.4; font-weight: 300; color: var(--c-charcoal-500);
	-moz-appearance: textfield;
}
.f-input::-webkit-outer-spin-button, .f-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.f-input::placeholder { color: var(--c-charcoal-500); opacity: .4; }
.f-input:focus { outline: 0; border-color: var(--c-charcoal-500); }

.f-list { display: flex; flex-direction: column; gap: 12px; }

.filters__mobile-actions { display: none; }


/* Чипсы активных фильтров */
.chips { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.chip, .chips__reset {
	display: inline-flex; align-items: center; gap: 8px;
	padding: 8px 12px; border-radius: 42px;
	font-size: 14px; line-height: 1.4; letter-spacing: -.02em;
}
.chip { background: var(--c-warm-50); }
.chip__x { width: 14px; height: 14px; background: currentColor; -webkit-mask: url("../../icons/close-circle.svg") center / contain no-repeat; mask: url("../../icons/close-circle.svg") center / contain no-repeat; }
.chip:hover { color: var(--c-accent); }
.chips__reset { border: 1px solid var(--c-line); }
.chips__reset:hover { border-color: var(--c-charcoal-500); }

/* ---------- Баннер в сетке ---------- */
.c-banner {
	grid-column: 1 / -1;
	margin-inline: calc(var(--gutter) * -1);
	display: flex;
}
.c-banner--mobile { display: none; }
.c-banner__product {
	flex: 1 1 0;
	height: 720px;
	display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 23px;
	background: var(--c-warm-50);
	text-align: center;
}
.c-banner__img { display: flex; width: 342.5px; height: 420px; padding: 10px; }
.c-banner__img img { width: 100%; height: 100%; object-fit: cover; mix-blend-mode: multiply; }
.c-banner__text { width: 400px; max-width: 100%; }
.c-banner__price { font-weight: 500; font-size: 16px; line-height: 1.2; margin-top: -3px; }
.c-banner__product:hover .c-banner__price { color: var(--c-accent); }
.c-banner__photo { flex: 1 1 0; height: 720px; }
.c-banner__photo img { width: 100%; height: 100%; object-fit: cover; }

.catalog-empty { padding: 40px var(--gutter) 60px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 20px; }
.catalog-empty__title { color: var(--c-charcoal-800); }
.catalog-empty__text { max-width: 440px; }
.catalog-empty__btn { height: 44px; padding-inline: 40px; }

/* ---------- Мобилка ---------- */
@media (max-width: 1023px) {
	.catalog { padding-top: 40px; gap: 40px; }
	.catalog__title { font-size: 34px; }
	.catalog__tools { gap: 20px; }
	.catalog__divider-m { display: block; }
	.catalog__count { display: none; }
	.catalog__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.catalog__more { padding-top: 0; }

	.filters__toggle { pointer-events: auto; }
	.filters__toggle-label { display: inline; }
	.filters[data-open] .filters__toggle-label { display: none; }
	.filters[data-open] .filters__toggle-close { display: inline-flex; align-items: center; gap: 8px; }
	.filters[data-open] .filters__toggle svg { display: none; }
	.filters[data-open] .sort { display: none; }
	.filters__x { position: relative; width: 12px; height: 12px; }
	.filters__x::before, .filters__x::after {
		content: ''; position: absolute; left: -2px; right: -2px; top: 50%; height: 1px; background: currentColor; transform: rotate(45deg);
	}
	.filters__x::after { transform: rotate(-45deg); }
	.filters__left { position: static; flex: 1 1 auto; min-width: 0; }
	.filters[data-open] .filters__left { flex-basis: 100%; }
	.filters__panel .f-group, .filters__panel .f-group__pop { min-width: 0; }
	.filters__bar { flex-wrap: wrap; }

	.filters__panel {
		display: none;
		position: static;
		order: 3;
		width: 100%;
		flex-direction: column; align-items: stretch; gap: 20px;
		padding: 20px;
		border-radius: 8px;
		background: var(--c-white);
		filter: drop-shadow(0 4px 25px rgba(160, 160, 160, .25));
	}
	.filters[data-open] .filters__panel { display: flex; }
	.filters[data-open] .filters__left { flex-direction: column; align-items: stretch; gap: 20px; }
	.f-group__btn { display: none; }
	.f-group__pop,
	.f-group.is-open .f-group__pop {
		position: static; width: auto; display: flex; padding: 0; gap: 12px;
		filter: none; background: none; border-radius: 0;
	}
	.f-group--price .f-group__pop { gap: 20px; }
	.f-group__title--acc { pointer-events: auto; }
	.f-group__title .plus { display: block; }
	.f-group:not(.is-acc-open) .f-list,
	.f-group:not(.is-acc-open) .f-reset-group { display: none; }
	.f-group.is-acc-open .f-group__title .plus::before { transform: rotate(45deg); }
	.f-group.is-acc-open .f-group__title .plus::after { transform: rotate(135deg); }
	.f-reset-group, .f-apply-desktop { display: none !important; }
	.filters__mobile-actions { display: flex; flex-direction: column; gap: 8px; }

	.c-banner--desktop { display: none; }
	.c-banner--mobile { display: flex; flex-direction: column-reverse; }
	.c-banner__photo { flex: none; height: 400px; }
	.c-banner__product { flex: none; height: auto; padding: 0 20px 40px; }
	.c-banner__img { width: 340px; max-width: 100%; height: 256px; }
}

/* ---------- Вид «коллекции» (Ювелирка и подразделы) ---------- */
.cat-banner { height: 520px; margin-top: calc(var(--header-h) * -1); }
@media (min-width: 1024px) {
	body:has(.site-header.is-compact) .cat-banner { margin-top: calc((var(--header-h) + 14px) * -1); }
}
.cat-banner img { width: 100%; height: 100%; object-fit: cover; }
.catalog--banner { padding-top: 30px; }
.catalog--coll .catalog__intro { text-align: left; }
.catalog__title--coll { color: var(--c-charcoal-800); }
.catalog--coll { gap: 40px; }
.catalog--coll .catalog__count { display: none; }
.catalog__grid--coll { grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 20px; row-gap: 20px; }
.catalog--coll .catalog__more { padding-top: 60px; }

.c-card { position: relative; display: flex; flex-direction: column; gap: 24px; padding: 16px; min-width: 0; }
.c-card__media { position: relative; display: block; height: 400px; padding: 14px; background: var(--c-warm-50); overflow: hidden; }
.c-card__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; mix-blend-mode: multiply; transition: transform .6s var(--ease); }
.c-card:hover .c-card__img { transform: scale(1.03); }
.c-card__chip {
	position: relative; display: inline-flex; align-items: center; gap: 4px;
	padding: 4px 8px; background: var(--c-white);
	font-weight: 500; font-size: 14px; line-height: normal; letter-spacing: -.01em;
}
.c-card__dot { width: 4px; height: 4px; border-radius: 50%; background: var(--c-charcoal-500); }
.c-card__fav { top: 26px; right: 26px; }
.c-card__body { display: flex; flex-direction: column; gap: 12px; }
.c-card__title { font-family: var(--f-head); font-weight: 500; font-size: 24px; line-height: 1.2; letter-spacing: -.03em; }
.c-card__title:hover { color: var(--c-accent); }
.c-card__desc { font-size: 12px; line-height: 1.2; font-weight: 400; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.c-card__price { font-weight: 500; font-size: 14px; line-height: 1.2; }

@media (max-width: 1023px) {
	/* На мобилке фото под шапкой, а не за ней (как на главной): иначе его почти целиком закрывают шапка и поиск */
	.cat-banner { height: 300px; margin-top: 0; }
	.catalog__grid--coll { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 10px; row-gap: 40px; }
	.c-card { padding: 0; gap: 20px; }
	.c-card__media { height: 180px; padding: 12px; }
	.c-card__chip { font-size: 10px; padding: 3px 6px; }
	.c-card__fav { top: 8px; right: 8px; }
	.c-card__title { font-size: 16px; }
	.c-card__body { gap: 8px; }
	.c-card__desc { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; font-size: 12px; }
	.c-card__price { font-size: 12px; }
}

/* Результаты поиска */
.search-page { padding: 40px 0 60px; display: flex; flex-direction: column; gap: 40px; }
.search-page__head { display: flex; flex-direction: column; gap: 20px; }
.search-page__head .breadcrumbs { margin-bottom: 20px; }
.search-page__form { display: flex; max-width: 695px; background: var(--c-warm-50); }
.search-block { display: flex; flex-direction: column; gap: 20px; }
.search-posts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.search-posts .b-card__media { height: 200px; }
.search-posts .b-card__title { font-size: 16px; }
body.bg-light { background: var(--c-white); }
@media (max-width: 1023px) {
	.search-page { padding-top: 24px; }
	.search-posts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.search-posts .b-card__media { height: 180px; }
}
.s-field { align-items: center; gap: 8px; height: 44px; padding: 12px 20px; border: 1px solid var(--c-line); border-radius: 42px; color: var(--c-charcoal-500); }
.s-field svg { width: 12px; height: 12px; flex: none; }
.s-field input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; padding: 0; font-size: 14px; line-height: 1.4; letter-spacing: -.02em; font-weight: 300; }
.s-field input::placeholder { color: var(--c-charcoal-500); opacity: .4; }
.s-field:focus-within { border-color: var(--c-charcoal-500); }

/* Низ списка (как у Cartier): гравюра-карусель, счётчик, «Показать ещё» — общий для каталога и «Ювелирных украшений» */
.j-more { display: flex; flex-direction: column; align-items: center; gap: 20px; padding-top: 40px; text-align: center; }
/* Рисунок заказчицы; размеры и отступы — пропорции Cartier (пантера ≈ 1,9 высоты кнопки), в нашем масштабе кнопки 220×50 */
.j-more__art { width: auto; height: 110px; margin-bottom: 20px; }
.j-more__count { margin-bottom: 4px; }
.j-more__count { font-size: 16px; color: var(--c-charcoal-500); }
.j-more__btn { min-width: 220px; padding-block: 14px; text-transform: uppercase; letter-spacing: .08em; font-weight: 500; border-color: var(--c-charcoal-500); }
.j-more__btn:hover { background: var(--c-black); color: var(--c-white); }
.catalog__seo { max-width: 860px; margin: 60px auto 0; color: var(--c-charcoal-500); opacity: .8; font-size: 14px; }
.catalog__seo p + p { margin-top: 12px; }
@media (max-width: 1023px) { .j-more__art { height: 96px; } }
