/* AVS Catalog — нейтральное оформление, наследует шрифты и цвета темы */
.avs-main, .avs-catalog {
	--avs-accent: #0b5cad;
	--avs-line: rgba(0, 0, 0, .12);
	--avs-soft: rgba(0, 0, 0, .04);
	--avs-muted: rgba(0, 0, 0, .6);
}
/* шорткод на обычной странице: шире колонки текста темы */
.avs-catalog { width: min(1200px, calc(100vw - 32px)); max-width: none !important; position: relative; left: 50%; transform: translateX(-50%); }
.avs-main {
	max-width: 1200px;
	margin: 0 auto;
	padding: 24px 16px 64px;
	box-sizing: border-box;
}
.avs-main *, .avs-catalog * { box-sizing: border-box; }
.avs-main img, .avs-catalog img { max-width: 100%; height: auto; display: block; }

.avs-crumbs { font-size: .875rem; color: var(--avs-muted); margin-bottom: 20px; }
.avs-crumbs a { color: inherit; text-decoration: none; }
.avs-crumbs a:hover { color: var(--avs-accent); text-decoration: underline; }
.avs-crumbs span { margin: 0 6px; }

.avs-product__top { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 40px; align-items: start; }
@media (max-width: 800px) { .avs-product__top { grid-template-columns: 1fr; gap: 24px; } }

.avs-gallery__main { background: #fff; border: 1px solid var(--avs-line); border-radius: 8px; aspect-ratio: 4 / 3; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.avs-gallery__main img { width: 100%; height: 100%; object-fit: contain; }
.avs-gallery__main--empty { color: var(--avs-muted); font-size: .9rem; }
.avs-gallery__thumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.avs-gallery__thumb { width: 72px; height: 72px; padding: 2px; border: 1px solid var(--avs-line); border-radius: 6px; background: #fff; cursor: pointer; }
.avs-gallery__thumb img { width: 100%; height: 100%; object-fit: contain; }
.avs-gallery__thumb.is-active, .avs-gallery__thumb:hover { border-color: var(--avs-accent); }

.avs-product__brand { display: inline-block; font-size: .8rem; letter-spacing: .06em; text-transform: uppercase; color: var(--avs-muted); text-decoration: none; margin-bottom: 6px; }
.avs-product__title, .avs-term__title { font-size: clamp(1.6rem, 3vw, 2.4rem); line-height: 1.15; margin: 0 0 12px; }
.avs-product__lead { font-size: 1.1rem; line-height: 1.5; margin: 0 0 20px; }
.avs-product__series { color: var(--avs-muted); font-size: .9rem; }

.avs-keyfacts { list-style: none; margin: 0 0 24px; padding: 0; border-top: 1px solid var(--avs-line); }
.avs-keyfacts li { display: flex; justify-content: space-between; gap: 16px; padding: 8px 0; border-bottom: 1px solid var(--avs-line); font-size: .95rem; }
.avs-keyfacts span { color: var(--avs-muted); }

.avs-btn { display: inline-block; padding: 10px 18px; border-radius: 6px; background: var(--avs-accent); color: #fff !important; text-decoration: none !important; font-weight: 600; font-size: .95rem; border: 1px solid var(--avs-accent); }
.avs-btn:hover { filter: brightness(1.1); }
.avs-btn--ghost { background: transparent; color: var(--avs-accent) !important; }

.avs-section { margin-top: 48px; }
.avs-section > h2 { font-size: 1.4rem; margin: 0 0 16px; padding-bottom: 8px; border-bottom: 2px solid var(--avs-line); }
.avs-text { max-width: 760px; line-height: 1.65; }
.avs-text h2, .avs-text h3 { font-size: 1.15rem; margin: 1.6em 0 .5em; }

.avs-tags { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; }
.avs-tags li { background: var(--avs-soft); border-radius: 999px; padding: 6px 14px; font-size: .9rem; }

.avs-specs { width: 100%; max-width: 900px; border-collapse: collapse; font-size: .95rem; }
.avs-specs th, .avs-specs td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--avs-line); }
.avs-specs tbody th { width: 40%; font-weight: 500; color: var(--avs-muted); }
.avs-specs thead th { font-weight: 600; }
.avs-specs ul { margin: 0; padding-left: 1.1em; }
.avs-specs__group th { background: var(--avs-soft); color: inherit !important; font-weight: 600; }
@media (max-width: 600px) {
	.avs-specs tbody th, .avs-specs tbody td { display: block; width: auto; }
	.avs-specs tbody th { border-bottom: 0; padding-bottom: 0; }
}

.avs-docs { list-style: none; margin: 0; padding: 0; }
.avs-docs li { padding: 10px 0; border-bottom: 1px solid var(--avs-line); }
.avs-docs a::before { content: "↓ "; }
.avs-docs__meta { color: var(--avs-muted); font-size: .85rem; margin-left: 6px; }

.avs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 20px; }
.avs-card { display: flex; flex-direction: column; gap: 6px; text-decoration: none !important; color: inherit !important; border: 1px solid var(--avs-line); border-radius: 8px; padding: 12px; background: #fff; transition: border-color .15s, box-shadow .15s; }
.avs-card:hover { border-color: var(--avs-accent); box-shadow: 0 4px 16px rgba(0, 0, 0, .08); }
.avs-card__img { aspect-ratio: 4 / 3; display: flex; align-items: center; justify-content: center; overflow: hidden; margin-bottom: 6px; }
.avs-card__img img { width: 100%; height: 100%; object-fit: contain; }
.avs-card__title { font-weight: 600; line-height: 1.3; }
.avs-card__text { font-size: .875rem; color: var(--avs-muted); line-height: 1.45; }
.avs-card__meta { font-size: .8rem; color: var(--avs-muted); }

.avs-term__intro { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 32px; margin-bottom: 32px; align-items: start; }
.avs-term__intro:not(:has(.avs-term__img)) { grid-template-columns: 1fr; }
@media (max-width: 800px) { .avs-term__intro { grid-template-columns: 1fr; } }
.avs-term > .avs-grid--tiles { margin-bottom: 24px; }

.avs-catalog .avs-cat-section { margin-bottom: 48px; }
.avs-catalog .avs-cat-section > h2 a { text-decoration: none; color: inherit; }

.avs-request { background: var(--avs-soft); border-radius: 8px; padding: 24px; }
.avs-request > h2 { border: 0; padding: 0; }
.avs-source { margin-top: 32px; font-size: .85rem; color: var(--avs-muted); }
.avs-source a { color: inherit; }
.avs-note { margin-top: 24px; padding: 12px 16px; border-left: 3px solid #c77700; background: rgba(199, 119, 0, .08); }
.avs-badge { display: inline-block; vertical-align: middle; margin-left: 10px; padding: 2px 8px; font-size: .75rem; font-weight: 500; border-radius: 4px; background: #fff3cd; color: #7a5a00; letter-spacing: 0; }
.avs-empty { color: var(--avs-muted); }

@media (prefers-color-scheme: dark) {
	/* тема может быть тёмной: подложка карточек и галереи остаётся светлой ради фото на белом фоне */
	.avs-card, .avs-gallery__main, .avs-gallery__thumb { color: #111 !important; }
}
