/*
Theme Name: СТАРМ
Description: Тема gkstarm.ru — повтор вёрстки Aspro Scorp (цветовая тема 8) для WordPress.
Version: 1.0.0
Requires PHP: 8.2
Text Domain: starm
*/

/* Основные стили — assets/template.css (собранный CSS старого шаблона). Здесь — только дополнения нового сайта. */

/* Картинки внутри текстов (align из старых описаний) */
.alignright { float: right; margin: 0 0 15px 20px; max-width: 50%; height: auto; }
.alignleft { float: left; margin: 0 20px 15px 0; max-width: 50%; height: auto; }
.aligncenter { display: block; margin: 0 auto 15px; }
.content-md img { max-width: 100%; height: auto; }

/* Таблицы из старых описаний — без инлайн-стилей, оформляем единообразно */
.content-md table:not(.props_table) { width: 100%; border-collapse: collapse; margin: 0 0 20px; font-size: 13px; }
.content-md table:not(.props_table) td, .content-md table:not(.props_table) th { border: 1px solid #dfe2e7; padding: 6px 8px; text-align: center; vertical-align: middle; }
.content-md table:not(.props_table) tr:first-child td, .content-md table:not(.props_table) th { background: #f3f5f8; font-weight: 600; }
.content-md .table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin-bottom: 20px; }
.content-md .table-scroll table { margin-bottom: 0; }

/* Доступный, но визуально скрытый текст (H1 главной для поисковиков дублирует видимый заголовок) */
.sr-only-focusable:not(:focus), .visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Фильтр каталога */
.filter .bx_filter_param_label.disabled { opacity: .45; }
.filter .bx_filter_button_box { padding: 10px 15px 15px; }
.filter .bx_filter_button_box .btn { margin: 0 5px 5px 0; }
.filter .bx_filter_parameters_box_container { max-height: 260px; overflow-y: auto; }
.catalog-count { color: #999; margin: 0 0 15px; }

/* Документы в карточке товара */
.docs-list { list-style: none; padding: 0; margin: 0 0 20px; }
.docs-list li { margin: 0 0 8px; }
.docs-list .fa { color: #969ba5; margin-right: 6px; }

/* Поиск */
.search-page .search-form { margin: 0 0 25px; display: flex; gap: 10px; }
.search-page .search-form input { flex: 1; }
.search-page .item { margin: 0 0 18px; }

/* Плитки «Наша продукция» на главной: картинки разных размеров не выходят за плитку */
.item-views.catalog.sections.front .img_category img { max-height: 150px; width: auto; margin: 0 auto; }

/* ===== Оформленные описания разделов (.sx) — фирменный синий #2BA2DF ===== */
.sx { --sx-blue: #2BA2DF; --sx-dark: #1d2029; --sx-soft: #f3f7f9; --sx-line: #dfeaed; color: #333; font-size: 14px; line-height: 1.6; }
.sx p { margin: 0 0 12px; }
.sx-h { font-size: 22px; font-weight: 700; color: var(--sx-dark); margin: 38px 0 16px; padding-left: 14px; border-left: 4px solid var(--sx-blue); line-height: 1.25; }
.sx-hero { display: flex; gap: 30px; align-items: center; background: var(--sx-soft); border-radius: 6px; padding: 28px 30px; }
.sx-hero__text { flex: 1; }
.sx-hero__img img { max-height: 260px; width: auto; display: block; mix-blend-mode: multiply; }
.sx-lead { font-size: 17px; line-height: 1.5; color: var(--sx-dark); font-weight: 600; }
.sx-hero__buttons { margin-top: 18px; }
.sx-hero__buttons .btn { margin: 0 10px 8px 0; }
.sx-kpis { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin: 18px 0 0; }
.sx-kpi { border: 1px solid var(--sx-line); border-radius: 6px; padding: 16px 12px; text-align: center; background: #fff; }
.sx-kpi__value { font-family: Ubuntu, sans-serif; font-size: 24px; font-weight: 700; color: var(--sx-blue); white-space: nowrap; line-height: 1.2; }
.sx-kpi__label { font-size: 12px; color: #666; margin-top: 6px; line-height: 1.35; }
.sx-kpi__label small { color: #999; font-size: 11px; }
.sx-chips, .sx-tags { list-style: none; padding: 0; margin: 0 0 12px; display: flex; flex-wrap: wrap; gap: 8px; }
.sx-chips li { background: var(--sx-soft); border: 1px solid var(--sx-line); border-radius: 18px; padding: 5px 14px; font-size: 13px; }
.sx-chips--options li { background: #fff; border-color: var(--sx-blue); color: var(--sx-blue); }
.sx-tags li { background: var(--sx-blue); color: #fff; border-radius: 4px; padding: 2px 10px; font-size: 13px; font-weight: 600; }
.sx-note { color: #777; font-size: 13px; }
.sx-note .fa { color: var(--sx-blue); margin-right: 6px; }
.sx-industries { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.sx-industries li { display: flex; align-items: center; gap: 12px; border: 1px solid var(--sx-line); border-radius: 6px; padding: 12px 14px; font-size: 13px; line-height: 1.35; }
.sx-industries .fa { flex: 0 0 38px; height: 38px; line-height: 38px; text-align: center; border-radius: 50%; background: var(--sx-soft); color: var(--sx-blue); font-size: 17px; }
.sx-chart { border: 1px solid var(--sx-line); border-radius: 6px; padding: 14px 16px 6px; margin: 0 0 12px; }
.sx-chart__title { font-weight: 600; color: var(--sx-dark); margin-bottom: 4px; }
.sx-chart svg { width: 100%; height: auto; display: block; font-family: "Open Sans", Arial, sans-serif; }
.sx-specs { width: 100%; }
.sx-cards { display: grid; gap: 14px; }
.sx-cards--2 { grid-template-columns: 1fr 1fr; }
.sx-cards--3 { grid-template-columns: repeat(3, 1fr); }
.sx-card { border: 1px solid var(--sx-line); border-radius: 6px; padding: 18px; background: #fff; }
.sx-card__title { font-weight: 700; color: var(--sx-dark); margin-bottom: 10px; font-size: 15px; }
.sx-card img { width: 100%; height: auto; border-radius: 4px; margin: 6px 0 12px; }
.sx-card__badge { display: inline-block; background: var(--sx-blue); color: #fff; font-weight: 700; border-radius: 4px; padding: 3px 12px; font-size: 13px; text-transform: uppercase; letter-spacing: .3px; }
.sx-checks { list-style: none; padding: 0; margin: 0; }
.sx-checks li { position: relative; padding-left: 26px; margin: 0 0 8px; }
.sx-checks li:before { content: "\f00c"; font-family: FontAwesome; position: absolute; left: 0; top: 0; color: var(--sx-blue); }
.sx-steps { list-style: none; counter-reset: sx; padding: 0; margin: 0 0 14px; }
.sx-steps li { counter-increment: sx; position: relative; padding: 4px 0 10px 46px; min-height: 34px; }
.sx-steps li:before { content: counter(sx); position: absolute; left: 0; top: 0; width: 32px; height: 32px; line-height: 32px; border-radius: 50%; background: var(--sx-blue); color: #fff; text-align: center; font-weight: 700; }
.sx-callout { display: flex; gap: 14px; align-items: flex-start; background: var(--sx-soft); border-left: 4px solid var(--sx-blue); border-radius: 4px; padding: 14px 16px; }
.sx-callout .fa { color: var(--sx-blue); font-size: 22px; margin-top: 2px; }
.sx-dims figure { margin: 0 0 18px; }
.sx-dims figcaption { font-weight: 600; color: var(--sx-dark); margin-bottom: 8px; }
.sx-dims img { max-width: 100%; height: auto; border: 1px solid var(--sx-line); border-radius: 4px; }
.sx-dims__pair { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-start; }
.sx-dims__pair a:first-child img { max-width: 260px; }
.sx-cta { display: flex; gap: 20px; align-items: center; justify-content: space-between; background: var(--sx-blue); color: #fff; border-radius: 6px; padding: 22px 26px; margin: 34px 0 10px; }
.sx-cta__text b { font-size: 17px; }
.sx-cta .btn { margin: 4px 0 4px 8px; }
.sx-cta .btn.btn-default:not(.white) { background: #fff !important; color: #2BA2DF !important; border-color: #fff !important; }
.sx-cta .btn.btn-default.white { background: transparent !important; color: #fff !important; border: 1px solid #fff !important; }
.sx-cta .btn.btn-default.white:hover { background: #fff !important; color: #2BA2DF !important; }
.sx-specs { border-collapse: collapse; border: 1px solid var(--sx-line); border-radius: 6px; }
.sx-specs td { padding: 9px 14px !important; border-bottom: 1px solid var(--sx-line); vertical-align: top; }
.sx-specs tr:nth-child(odd) td { background: var(--sx-soft); }
.sx-specs .char_name { width: 38%; color: #666; }
.sx-specs .char_value { color: var(--sx-dark); font-weight: 600; }
@media (max-width: 991px) {
  .sx-kpis { grid-template-columns: repeat(3, 1fr); }
  .sx-cards--3 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .sx-hero { flex-direction: column-reverse; padding: 20px; }
  .sx-kpis, .sx-cards--2, .sx-cards--3 { grid-template-columns: 1fr 1fr; }
  .sx-cards--2 { grid-template-columns: 1fr; }
  .sx-cta { flex-direction: column; align-items: flex-start; }
  .sx-cta .btn { margin: 4px 8px 4px 0; }
}
