/*
Theme Name: SMC Pneumatics Modern
Theme URI: https://smc-pneumatics.ru/
Author: money_maker
Description: Адаптивная B2B-тема каталога компонентов SMC с фокусом на поиск, подбор и запрос коммерческого предложения.
Version: 0.5.3
Requires at least: 6.8
Requires PHP: 8.0
Text Domain: smc-modern
*/

:root {
  color-scheme: light;
  --ink: #111820;
  --muted: #65717b;
  --soft: #f3f5f6;
  --line: #dce2e5;
  --surface: #fff;
  --red: #c6172c;
  --red-dark: #8e1020;
  --navy: #172331;
  --green: #16724a;
  --shadow: 0 18px 60px rgba(14, 24, 34, .08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: #fff; color: var(--ink); font: 16px/1.55 system-ui, -apple-system, "Segoe UI", sans-serif; }
button, input, textarea, select { font: inherit; }
a { color: inherit; }
img, svg { display: block; max-width: 100%; height: auto; }
.container { width: min(1240px, calc(100% - 40px)); margin-inline: auto; }
.skip-link { position: fixed; top: 8px; left: 8px; z-index: 100; transform: translateY(-140%); padding: 10px 14px; background: #fff; border: 2px solid var(--red); }
.skip-link:focus { transform: none; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.screen-reader-text:focus { position: fixed; top: 8px; left: 8px; z-index: 1000; width: auto; height: auto; margin: 0; padding: 10px 14px; clip: auto; background: #fff; }
.eyebrow { margin: 0 0 12px; color: var(--red); font-size: 13px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.pill { display: inline-flex; align-items: center; gap: 7px; padding: 6px 9px; border-radius: 999px; background: #eef6f2; color: var(--green); font-size: 13px; font-weight: 700; }
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }

.topbar { background: var(--navy); color: #eaf0f4; font-size: 13px; }
.topbar__inner { display: flex; min-height: 38px; align-items: center; }
.site-header { position: relative; z-index: 50; background: #fff; border-bottom: 1px solid var(--line); }
.site-header__showcase { display: grid; grid-template-columns: 290px minmax(0, 720px); gap: 24px; align-items: center; justify-content: center; padding-block: 18px; }
.site-header__identity { align-self: stretch; display: flex; min-height: 326px; flex-direction: column; justify-content: center; padding: 28px; border: 1px solid var(--line); background: linear-gradient(145deg, #fff 0%, #f5f7f8 70%, #fbecef 100%); }
.site-header__identity p { max-width: 280px; margin: 22px 0 0; color: var(--muted); font-size: 14px; }
.brand { display: inline-flex; min-width: 0; align-items: center; gap: 12px; text-decoration: none; }
.site-header__identity .brand { align-items: flex-start; flex-direction: column; gap: 16px; }
.brand__mark { display: grid; width: 58px; height: 58px; flex: 0 0 58px; place-items: center; background: var(--red); color: #fff; font-weight: 900; letter-spacing: -.08em; }
.brand__name { display: block; overflow: hidden; font-size: 20px; font-weight: 900; line-height: 1.05; text-overflow: ellipsis; }
.brand__sub { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; }
.nav-toggle { display: none; }
.utility-bar { background: var(--navy); color: #fff; }
.utility-bar__inner { display: flex; min-height: 46px; align-items: center; justify-content: center; }
.utility-nav ul { display: flex; align-items: center; justify-content: center; gap: 4px; margin: 0; padding: 0; list-style: none; }
.utility-nav a { display: block; padding: 10px 18px; border-radius: 3px; text-decoration: none; font-size: 14px; font-weight: 750; }
.utility-nav a:hover, .utility-nav .current-menu-item > a, .utility-nav .current_page_item > a { background: rgba(255,255,255,.1); color: #fff; }
.catalog-nav { width: min(720px, 100%); min-width: 0; justify-self: center; }
.catalog-nav__grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.catalog-tile { position: relative; display: block; min-width: 0; overflow: hidden; border: 1px solid var(--line); background: #fff; box-shadow: 0 7px 24px rgba(14,24,34,.06); text-decoration: none; transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease; }
.catalog-tile img { width: 100%; aspect-ratio: 129 / 163; object-fit: cover; }
.catalog-tile span { position: absolute; inset: auto 5px 5px; display: flex; min-height: 38px; align-items: center; justify-content: center; padding: 4px 5px; overflow-wrap: anywhere; hyphens: auto; color: #fff; font-size: 11px; font-weight: 750; line-height: 1.08; text-align: center; text-shadow: 0 1px 2px rgba(0,0,0,.5); }
.catalog-tile:hover, .catalog-tile:focus-visible { z-index: 1; transform: translateY(-3px); border-color: var(--red); box-shadow: 0 14px 34px rgba(14,24,34,.16); outline: none; }

.button, .wp-element-button { display: inline-flex; min-height: 44px; align-items: center; justify-content: center; gap: 8px; padding: 10px 16px; border: 1px solid transparent; border-radius: 5px; background: var(--red); color: #fff; cursor: pointer; font-weight: 800; text-decoration: none; }
.button:hover, .wp-element-button:hover { background: var(--red-dark); }
.button--dark { background: var(--navy); }
.button--dark:hover { background: #26384b; }
.button--ghost { border-color: #aab6bd; background: #fff; color: var(--ink); }
.button--ghost:hover { background: var(--soft); }
.button--small { min-height: 38px; padding: 8px 12px; font-size: 14px; }
.site-header .nav-toggle { display: none; }
.quote-count { display: inline-grid; min-width: 22px; height: 22px; place-items: center; border-radius: 999px; background: #fff; color: var(--red); font-size: 12px; }

.hero { position: relative; overflow: hidden; padding: 72px 0 66px; background: linear-gradient(120deg, #f7f9fa 0%, #fff 56%, #f8e9ec 100%); border-bottom: 1px solid var(--line); }
.hero::after { content: ""; position: absolute; width: 420px; height: 420px; right: -140px; bottom: -220px; border: 90px solid rgba(198,23,44,.08); border-radius: 50%; }
.hero__grid { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(360px, .75fr); gap: 54px; align-items: center; }
.hero h1 { max-width: 760px; margin: 0; font-size: clamp(38px, 5vw, 66px); line-height: 1.03; letter-spacing: -.045em; }
.hero__lead { max-width: 730px; margin: 22px 0 0; color: #394650; font-size: 20px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.hero__note { display: flex; flex-wrap: wrap; gap: 12px 22px; margin-top: 24px; color: var(--muted); font-size: 14px; }
.hero__note span::before { content: "✓"; margin-right: 7px; color: var(--green); font-weight: 900; }
.hero-panel { padding: 24px; background: var(--navy); color: #fff; box-shadow: var(--shadow); }
.hero-panel h2 { margin: 0; font-size: 23px; }
.hero-panel p { margin: 8px 0 0; color: #cbd4da; }
.hero-panel__search { display: flex; margin-top: 20px; }
.hero-panel__search input { min-width: 0; flex: 1; padding: 13px; border: 0; }
.hero-panel__search button { border-radius: 0; }
.hero-panel__links { display: grid; gap: 8px; margin-top: 18px; }
.hero-panel__links a { color: #fff; font-size: 14px; }
.trust { border-bottom: 1px solid var(--line); }
.trust__grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.trust__item { padding: 20px 22px; border-right: 1px solid var(--line); }
.trust__item:last-child { border-right: 0; }
.trust__item strong { display: block; }
.trust__item span { display: block; margin-top: 4px; color: var(--muted); font-size: 13px; }

.section { padding: 72px 0; }
.section--soft { background: var(--soft); }
.section--dark { background: var(--navy); color: #fff; }
.section__head { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.section__head h1, .section__head h2 { max-width: 780px; margin: 0; font-size: clamp(28px, 4vw, 43px); line-height: 1.08; letter-spacing: -.03em; }
.section__head p { max-width: 620px; margin: 10px 0 0; color: var(--muted); }
.section--dark .section__head p { color: #cbd4da; }
.catalog-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.catalog-card { display: flex; min-height: 185px; flex-direction: column; padding: 18px; border: 1px solid var(--line); background: #fff; text-decoration: none; transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease; }
.catalog-card:hover { transform: translateY(-3px); border-color: #b3bdc3; box-shadow: var(--shadow); }
.catalog-card__icon { display: grid; width: 50px; height: 50px; place-items: center; margin-bottom: auto; border-radius: 50%; background: #f8e9ec; color: var(--red); font-weight: 900; }
.catalog-card h3 { margin: 22px 0 0; font-size: 17px; line-height: 1.2; }
.catalog-card span { margin-top: 7px; color: var(--muted); font-size: 13px; }
.content-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.content-card { display: flex; min-width: 0; min-height: 250px; flex-direction: column; padding: 22px; border: 1px solid var(--line); background: #fff; }
.content-card__meta { margin-bottom: 12px; color: var(--red); font-size: 12px; font-weight: 800; text-transform: uppercase; }
.content-card h2, .content-card h3 { margin: 0; font-size: 21px; line-height: 1.2; }
.content-card h2 a, .content-card h3 a { text-decoration: none; }
.content-card p { color: var(--muted); }
.content-card__footer { margin-top: auto; padding-top: 18px; font-weight: 800; }
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; counter-reset: steps; }
.step { position: relative; padding: 23px; border: 1px solid rgba(255,255,255,.16); }
.step::before { counter-increment: steps; content: "0" counter(steps); display: block; margin-bottom: 22px; color: #ff7f8e; font-size: 13px; font-weight: 900; }
.step h3 { margin: 0; font-size: 19px; }
.step p { margin: 9px 0 0; color: #cbd4da; font-size: 14px; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(360px, .85fr); gap: 50px; align-items: start; }
.check-list { display: grid; gap: 12px; margin: 24px 0 0; padding: 0; list-style: none; }
.check-list li { position: relative; padding-left: 29px; }
.check-list li::before { content: "✓"; position: absolute; left: 0; top: 0; color: var(--green); font-weight: 900; }
.form-card { padding: 24px; border: 1px solid var(--line); background: #fff; box-shadow: var(--shadow); }

.breadcrumb { padding: 18px 0; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.breadcrumb a { color: inherit; }
.page-hero { padding: 48px 0; background: var(--soft); border-bottom: 1px solid var(--line); }
.page-hero h1 { max-width: 900px; margin: 0; font-size: clamp(34px, 5vw, 54px); line-height: 1.05; letter-spacing: -.04em; }
.page-hero p { max-width: 760px; margin: 16px 0 0; color: #46535c; font-size: 18px; }
.page-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.entry-content { max-width: 900px; }
.entry-content > * { max-width: 100%; }
.entry-content h2 { margin-top: 1.7em; font-size: clamp(26px, 4vw, 38px); line-height: 1.15; }
.entry-content h3 { margin-top: 1.5em; font-size: 24px; }
.entry-content table { width: 100%; border-collapse: collapse; }
.entry-content th, .entry-content td { padding: 12px; border: 1px solid var(--line); text-align: left; vertical-align: top; }
.entry-content blockquote { margin-inline: 0; padding: 2px 0 2px 22px; border-left: 4px solid var(--red); color: #3c4851; }
.entry-content a { color: var(--red-dark); }
.pagination { margin-top: 34px; }
.nav-links { display: flex; flex-wrap: wrap; gap: 8px; }
.page-numbers { padding: 8px 12px; border: 1px solid var(--line); text-decoration: none; }
.page-numbers.current { background: var(--navy); color: #fff; }
.notice { margin-top: 18px; padding: 14px; border-left: 4px solid var(--red); background: #fdf2f4; font-size: 14px; }

.site-footer { padding: 46px 0 28px; background: #101922; color: #e7edf0; }
.footer-grid { display: grid; grid-template-columns: 1.35fr 1fr 1fr; gap: 50px; }
.site-footer h2, .site-footer h3 { margin: 0 0 12px; color: #fff; }
.site-footer p { color: #b7c3ca; }
.site-footer a { color: #e7edf0; }
.site-footer ul { margin: 0; padding: 0; list-style: none; }
.site-footer li + li { margin-top: 8px; }
.footer-bottom { display: flex; justify-content: space-between; gap: 20px; margin-top: 34px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.13); color: #9eacb4; font-size: 12px; }

.pilot-product-index { border-bottom: 1px solid var(--line); background: #fff; }
.pilot-product-index__inner { display: flex; min-height: 50px; align-items: center; gap: 16px; overflow-x: auto; white-space: nowrap; }
.pilot-product-index a { color: var(--red); font-weight: 750; text-decoration: none; }
.pilot-product-index a:hover { text-decoration: underline; }
.smc-pilot-product { scroll-margin-top: 24px; }
.smc-pilot-product + .smc-pilot-product { border-top: 12px solid var(--navy); }

@media (max-width: 1040px) {
  .site-header__showcase { grid-template-columns: 1fr; }
  .site-header__identity { min-height: 0; padding: 20px; }
  .site-header__identity p { max-width: none; margin-top: 14px; }
  .site-header__identity .brand { align-items: center; flex-direction: row; gap: 12px; }
  .utility-nav { display: none; grid-column: 1 / -1; }
  .utility-nav.is-open { display: block; }
  .utility-nav ul { align-items: stretch; flex-direction: column; padding-block: 8px; }
  .utility-bar__inner { flex-wrap: wrap; justify-content: flex-end; }
  .utility-nav { width: 100%; order: 2; }
  .nav-toggle { order: 1; }
  .site-header .nav-toggle { display: inline-flex; }
  .catalog-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .trust__grid { grid-template-columns: repeat(2, 1fr); }
  .trust__item:nth-child(2) { border-right: 0; }
  .trust__item:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
}

@media (max-width: 820px) {
  .container { width: min(100% - 22px, 680px); }
  .topbar__inner { align-items: flex-start; padding-block: 9px; }
  .site-header__showcase { width: 100%; gap: 12px; padding-block: 12px; }
  .site-header__identity { margin-inline: 11px; }
  .catalog-nav { width: 100%; overflow-x: auto; padding: 0 11px 8px; scrollbar-width: thin; }
  .catalog-nav__grid { width: max-content; grid-template-columns: repeat(5, 126px); gap: 9px; }
  .catalog-tile { width: 126px; }
  .utility-bar__inner { width: 100%; padding-inline: 11px; }
  .hero { padding: 48px 0; }
  .hero__grid, .split { grid-template-columns: 1fr; }
  .hero-panel { max-width: 620px; }
  .catalog-grid, .content-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 540px) {
  .topbar__inner { display: block; }
  .brand__sub { display: none; }
  .brand__name { font-size: 16px; }
  .brand__mark { width: 50px; height: 50px; flex-basis: 50px; }
  .site-header__identity { padding: 16px; }
  .site-header__identity p { font-size: 13px; }
  .hero h1 { font-size: 39px; }
  .hero__lead { font-size: 17px; }
  .hero__actions .button { width: 100%; }
  .hero-panel { padding: 18px; }
  .hero-panel__search { display: grid; gap: 8px; }
  .hero-panel__search .button { width: 100%; }
  .trust__grid, .catalog-grid, .content-grid, .steps, .footer-grid { grid-template-columns: 1fr; }
  .trust__item { border-right: 0; border-bottom: 1px solid var(--line); }
  .section { padding: 50px 0; }
  .section__head { align-items: flex-start; flex-direction: column; }
  .catalog-card { min-height: 145px; }
  .entry-content table { display: block; max-width: 100%; overflow-x: auto; }
  .footer-bottom { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
