/*
Theme Name: RACK5
Author: RACK5
Description: Лёгкая тема тестового каталога RACK5 с поддержкой WooCommerce. Каталог наполняется отдельно через обмен с 1С.
Version: 0.10.16
Requires at least: 6.5
Requires PHP: 8.0
Text Domain: rack5
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
*/

@font-face{font-family:Montserrat;src:url("assets/fonts/montserrat-400.woff2") format("woff2");font-weight:400;font-style:normal;font-display:swap}
@font-face{font-family:Montserrat;src:url("assets/fonts/montserrat-600.woff2") format("woff2");font-weight:600;font-style:normal;font-display:swap}
@font-face{font-family:Montserrat;src:url("assets/fonts/montserrat-700.woff2") format("woff2");font-weight:700;font-style:normal;font-display:swap}

:root {
	--color-brand: #20178f;
	--color-brand-hover: #15106b;
	--color-ink: #242b36;
	--color-muted: #6d7480;
	--color-surface: #ffffff;
	--color-soft: #f3f5f8;
	--color-line: #dce1e8;
	--color-focus: #a84500;
	--color-footer: #303030;
	--radius: 4px;
	--shell: 1350px;
	--gutter: clamp(1rem, 4vw, 4.25rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: 1rem; -webkit-text-size-adjust: 100%; }
body { margin: 0; min-width: 280px; color: var(--color-ink); background: var(--color-surface); font: 400 1rem/1.65 Montserrat, Arial, sans-serif; overflow-wrap: break-word; }
body { display: flex; min-height: 100vh; flex-direction: column; }
.site-main { flex: 1; }
img, video { max-width: 100%; height: auto; }
img { vertical-align: middle; }
svg { display: block; max-width: 100%; }
a { color: var(--color-brand); text-underline-offset: .2em; text-decoration-thickness: 1px; }
a:hover { color: var(--color-brand-hover); }
button, input, select, textarea { font: inherit; }
button, input, select, textarea, a { -webkit-tap-highlight-color: transparent; }
button, select, input[type="submit"] { cursor: pointer; }
input, select, textarea { max-width: 100%; border: 1px solid var(--color-line); border-radius: var(--radius); color: var(--color-ink); background: var(--color-surface); }
input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="hidden"]), select, textarea { min-height: 46px; padding: .625rem .75rem; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--color-brand); }
textarea { width: 100%; min-height: 140px; resize: vertical; }
:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 4px; }
[tabindex="-1"]:focus:not(:focus-visible) { outline: none; }
::selection { color: white; background: var(--color-brand); }
h1, h2, h3, h4, h5, h6 { margin: 0 0 1rem; font-weight: 600; line-height: 1.25; letter-spacing: -.03em; }
h1 { font-size: clamp(2rem, 4vw, 3rem); }
h2 { font-size: clamp(1.5rem, 2.5vw, 2rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1.25rem; }
ul, ol { padding-left: 1.5rem; }
hr { margin: 2rem 0; border: 0; border-top: 1px solid var(--color-line); }
blockquote { margin: 1.5rem 0; padding: .75rem 1.5rem; border-left: 3px solid var(--color-brand); background: var(--color-soft); }
pre { padding: 1rem; overflow: auto; background: var(--color-soft); }
.shell { width: min(var(--shell), calc(100% - var(--gutter) * 2)); margin-inline: auto; }
.icon { flex: 0 0 22px; width: 22px; height: 22px; }
.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; }
.skip-link:focus { position: fixed; top: 1rem; left: 1rem; z-index: 100000; width: auto; height: auto; margin: 0; padding: .75rem 1.25rem; clip: auto; overflow: visible; color: white; background: var(--color-brand); }

/* Global header: source-aligned identity bar plus primary blue navigation. */
/* Hidden mobile navigation stays hidden on shared-shell errors without JS. */
body.r5h-shell-page .r5h-mobile-nav[hidden] { display: none; }
.test-notice { color: var(--color-brand-hover); background: #edf0f6; border-bottom: 1px solid var(--color-line); font-size: .75rem; }
.test-notice__inner { display: flex; min-height: 30px; align-items: center; gap: 1rem; padding-block: .25rem; }
.test-notice__label { flex-shrink: 0; font-weight: 700; }
.test-notice__label::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: .5rem; border-radius: 50%; background: var(--color-brand); vertical-align: middle; }
.site-header { position: relative; z-index: 20; background: var(--color-surface); }
.header-top { display: grid; grid-template-columns: minmax(390px, 1fr) auto auto; min-height: 78px; align-items: center; gap: clamp(1.25rem, 3vw, 3.5rem); }
.site-brand { display: flex; min-width: 0; align-items: center; gap: 2rem; }
.brand-link, .custom-logo-link { display: inline-flex; flex-shrink: 0; align-items: center; }
.site-brand img { width: 190px; height: auto; }
.brand-caption { max-width: 230px; color: #999; font-size: .75rem; line-height: 1.65; }
.header-phone { color: #0f1115; font-size: .9375rem; line-height: 1; font-weight: 700; text-decoration: none; white-space: nowrap; }
.header-phone:hover { color: var(--color-brand); }
.header-actions { display: flex; align-items: center; gap: 1.5rem; }
.header-actions > a { display: inline-flex; min-height: 44px; align-items: center; gap: .625rem; color: #545963; font-size: .6875rem; line-height: 1; letter-spacing: .04em; text-decoration: none; text-transform: uppercase; white-space: nowrap; }
.header-actions > a:hover, .header-actions > a.is-current { color: var(--color-brand); }
.header-actions .icon { width: 20px; height: 20px; color: #919191; }
.header-cart { width: 42px; justify-content: center; }
.header-search { position: relative; flex: 0 1 360px; width: clamp(240px, 24vw, 360px); }
.header-product-search, .header-product-search__control { position: relative; width: 100%; }
.header-product-search__control { display: flex; }
.header-product-search input { flex: 1; width: 100%; min-width: 0; min-height: 42px !important; border-right: 0; border-radius: var(--radius) 0 0 var(--radius); font-size: .75rem; }
.header-product-search button { display: inline-flex; flex: 0 0 auto; min-width: 76px; min-height: 42px; align-items: center; justify-content: center; gap: .375rem; padding: .5rem .625rem; border-radius: 0 var(--radius) var(--radius) 0; font-size: .6875rem; }
.header-product-search button .icon { width: 17px; height: 17px; color: currentColor; }
.header-search__suggestions { position: absolute; top: calc(100% + .375rem); right: 0; left: 0; z-index: 40; max-height: min(420px, 65vh); overflow-y: auto; border: 1px solid var(--color-line); background: var(--color-surface); box-shadow: 0 12px 35px rgb(19 24 39 / 14%); }
.header-search__suggestions[hidden] { display: none; }
.header-search__suggestions ul { margin: 0; padding: 0; list-style: none; }
.header-search__suggestions li + li { border-top: 1px solid var(--color-line); }
.header-search__suggestions a { display: grid; gap: .125rem; min-height: 54px; padding: .625rem .75rem; color: var(--color-ink); font-size: .6875rem; line-height: 1.35; text-decoration: none; }
.header-search__suggestions a:hover, .header-search__suggestions a:focus-visible { color: var(--color-ink); background: var(--color-soft); }
.header-search__suggestions strong { color: var(--color-brand); font-size: .75rem; letter-spacing: .02em; }
.header-search__suggestions span { color: var(--color-muted); }
.header-search__message { padding: .75rem; color: var(--color-muted); font-size: .6875rem; line-height: 1.45; }
.primary-bar { background: var(--color-brand); }
.primary-menu__toggle { display: none; }
.primary-nav { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.primary-nav a { display: inline-flex; min-height: 54px; align-items: center; justify-content: center; gap: .75rem; padding: .75rem 1rem; color: white; font-size: .75rem; font-weight: 700; letter-spacing: .05em; text-align: center; text-decoration: none; text-transform: uppercase; }
.primary-nav a:hover, .primary-nav a.is-current { color: white; background: rgb(5 9 75 / 38%); }
.primary-nav .nav-products { justify-content: flex-start; padding-left: clamp(1rem, 5vw, 6rem); }
.primary-nav .nav-products .icon { width: 15px; height: 15px; }

/* Home */
.home-intro { border-bottom: 1px solid var(--color-line); background: var(--color-soft); }
.intro-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); align-items: center; gap: 3rem; padding-block: 3.5rem; }
.intro-grid > * { min-width: 0; }
.eyebrow { margin-bottom: 1rem; color: var(--color-brand); font-size: .6875rem; line-height: 1.5; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; }
.intro-copy h1 { max-width: 700px; margin-bottom: 1.25rem; font-size: clamp(2rem, 3.75vw, 3.375rem); line-height: 1.15; letter-spacing: -.05em; overflow-wrap: anywhere; }
.intro-description { max-width: 500px; margin-bottom: 1.75rem; color: var(--color-muted); font-size: .9375rem; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: .75rem; min-height: 48px; padding: .75rem 1.25rem; border: 1px solid transparent; border-radius: var(--radius); font: 600 .8125rem/1.5 Montserrat, Arial, sans-serif; text-align: center; text-decoration: none; cursor: pointer; transition: background-color .15s, border-color .15s; }
.button-primary, button[type="submit"], input[type="submit"] { border-color: var(--color-brand); color: var(--color-surface); background: var(--color-brand); }
.button-primary:hover, button[type="submit"]:hover, input[type="submit"]:hover { border-color: var(--color-brand-hover); color: var(--color-surface); background: var(--color-brand-hover); }
.text-link { display: inline-flex; min-height: 44px; align-items: center; gap: .75rem; font-size: .8125rem; font-weight: 600; text-decoration: none; }
.text-link:hover { text-decoration: underline; }
.brand-pattern { position: relative; width: 100%; max-width: 400px; justify-self: end; }
.brand-pattern svg { width: 100%; height: auto; }
.pattern-grid { stroke: #e1e6ee; stroke-width: .8; }
.pattern-outline { stroke: var(--color-brand); stroke-width: 1.5; }
.pattern-side { fill: var(--color-brand); }
.pattern-top { fill: #e1e7f0; }
.pattern-front { fill: #f8f9fb; }
.pattern-line { stroke: #8594b0; stroke-width: 2; }
.pattern-accent { stroke: var(--color-brand); stroke-width: 2; }
.pattern-node { stroke: #8492aa; stroke-width: 1.5; }
.pattern-caption { display: flex; align-items: center; justify-content: space-between; margin-top: .5rem; color: var(--color-brand); font-size: .6875rem; font-weight: 700; letter-spacing: .09em; }
.pattern-caption span { font-size: .5625rem; font-weight: 600; }
.catalog-section { padding-block: 3rem 4rem; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 1.5rem; margin-bottom: 1.75rem; }
.section-heading .eyebrow { margin-bottom: .5rem; }
.section-heading h2 { margin: 0; }
.catalog-empty { display: flex; align-items: center; gap: 2rem; min-height: 220px; padding: 2rem 2.5rem; border: 1px solid var(--color-line); border-radius: var(--radius); background: var(--color-surface); }
.catalog-empty__icon { display: grid; flex: 0 0 80px; place-items: center; width: 80px; height: 80px; border-radius: var(--radius); color: var(--color-brand); background: var(--color-soft); }
.catalog-empty__icon .icon { width: 36px; height: 36px; }
.catalog-empty__copy { max-width: 650px; }
.catalog-empty h2, .catalog-empty h3 { margin: 0 0 .75rem; font-size: 1.25rem; }
.catalog-empty p { margin-bottom: 1rem; color: var(--color-muted); font-size: .875rem; }
.catalog-empty__status { display: inline-block; padding: .25rem .625rem; border: 1px solid var(--color-line); border-radius: 2px; color: var(--color-muted); font-size: .6875rem; font-weight: 600; }

/* Content and native WordPress blocks */
.page-main, .shop-main { padding-block: 2rem 4rem; }
.page-main { min-height: 50vh; }
.page-heading { margin-bottom: 2rem; }
.page-heading h1 { margin: .75rem 0 0; }
.back-link { display: inline-flex; min-height: 44px; align-items: center; color: var(--color-muted); font-size: .8125rem; }
.entry-content > :first-child { margin-top: 0; }
.entry-content > :last-child { margin-bottom: 0; }
.entry-content::after { content: ""; display: table; clear: both; }
.entry-content :where(p, li) { overflow-wrap: anywhere; }
.entry-content li + li { margin-top: .5rem; }
.prose { max-width: 800px; }
.alignwide { width: 100%; }
.alignfull { max-width: 100%; }
.alignleft { float: left; margin: 0 1.5rem 1rem 0; }
.alignright { float: right; margin: 0 0 1rem 1.5rem; }
.aligncenter { display: block; margin-inline: auto; }
.wp-caption { max-width: 100%; }
.wp-caption-text, .gallery-caption, figcaption { margin-top: .5rem; color: var(--color-muted); font-size: .8125rem; }
.wp-block-table { overflow-x: auto; }
.entry-content table { width: 100%; border-collapse: collapse; }
.entry-content th, .entry-content td { padding: .75rem; border: 1px solid var(--color-line); text-align: left; }
.entry-content th { background: var(--color-soft); }
.wp-block-button__link { border-radius: var(--radius); background: var(--color-brand); font-size: .875rem; }
.posts-list { max-width: 850px; }
.post-summary { padding-block: 1.5rem; border-bottom: 1px solid var(--color-line); }
.post-summary h2 a { color: var(--color-ink); text-decoration: none; }
.post-summary h2 a:hover { text-decoration: underline; }
.pagination, .page-links { margin-block: 2rem; }
.page-numbers { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: .5rem; border: 1px solid var(--color-line); }
.page-numbers.current { color: white; background: var(--color-brand); }
.not-found { max-width: 700px; padding-block: 2rem 3rem; }
.not-found p:not(.eyebrow), .content-empty p { color: var(--color-muted); }
.search-form { display: flex; align-items: stretch; gap: .5rem; max-width: 600px; }
.search-form label { flex: 1; min-width: 0; }
.search-form input { width: 100%; height: 100%; }
.comments-area { margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--color-line); }
.comment-list, .comment-list .children { padding-left: 1.5rem; }
.comment-body { margin-bottom: 1.5rem; }
.comment-author img { margin-right: .5rem; border-radius: 50%; }
.comment-metadata { margin-block: .5rem; font-size: .75rem; }
.comment-form label { display: block; margin-bottom: .5rem; }
.comment-form-cookies-consent label { display: inline; }
.comment-form input[type="submit"] { padding: .75rem 1.25rem; }

/* Footer */
.site-footer { margin-top: auto; color: #aeb0b5; background: var(--color-footer); }
.footer-main { display: grid; grid-template-columns: 1.05fr 1.3fr 1.25fr minmax(260px, 1.4fr); gap: clamp(2rem, 5vw, 7rem); padding-block: 3.75rem 4.5rem; }
.footer-column { display: flex; min-width: 0; flex-direction: column; align-items: flex-start; gap: .35rem; }
.footer-column h2 { margin: 0 0 .75rem; color: white; font-size: .75rem; line-height: 1.5; font-weight: 700; letter-spacing: .045em; text-transform: uppercase; }
.footer-column h2 a, .footer-column .footer-emphasis { color: white; font-weight: 700; text-transform: uppercase; }
.footer-column a { display: inline-flex; min-height: 30px; align-items: center; color: #aeb0b5; font-size: .75rem; line-height: 1.6; text-decoration: none; }
.footer-column a:hover { color: white; text-decoration: underline; }
.footer-column--primary { gap: .65rem; }
.footer-subscribe { justify-content: space-between; width: 100%; min-height: 46px !important; margin-bottom: 1rem; padding: .75rem 1rem; color: white !important; background: #464646; font-size: .6875rem !important; letter-spacing: .04em; text-transform: uppercase; }
.footer-subscribe .icon { width: 20px; height: 20px; color: #777; }
.footer-contact { display: flex; min-height: 36px; align-items: flex-start; gap: .75rem; margin: 0; color: #f0f0f0 !important; font-size: .8125rem !important; text-transform: none; }
.footer-contact .icon { flex-basis: 16px; width: 16px; height: 16px; margin-top: .25rem; color: #929292; }
.footer-contact span { min-width: 0; }
.footer-bottom { display: flex; min-height: 74px; align-items: center; justify-content: space-between; gap: 1rem; border-top: 1px solid #464646; color: #b8bbc0; font-size: .6875rem; }

@media (max-width: 1100px) {
	.header-top { grid-template-columns: minmax(230px, 1fr) auto auto; gap: 1.5rem; }
	.brand-caption { display: none; }
	.header-actions { gap: .75rem; }
	.header-search { width: clamp(220px, 27vw, 280px); }
	.intro-grid { gap: 2rem; }
	.footer-main { gap: 2.5rem; }
}
@media (max-width: 900px) {
	.header-top { grid-template-columns: minmax(180px, 1fr) auto; min-height: 76px; }
	.site-brand img { width: 150px; }
	.header-phone { display: none; }
	.header-actions { gap: .75rem; }
	.primary-menu { width: 100%; }
	.has-js .primary-menu__toggle { display: flex; width: 100%; min-height: 50px; align-items: center; justify-content: space-between; padding: 0; border: 0; color: white; background: transparent; cursor: pointer; font-size: .75rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
	.primary-menu__toggle span { display: inline-flex; align-items: center; gap: .625rem; }
	.primary-menu__toggle .icon { width: 16px; height: 16px; }
	.primary-menu.is-open .primary-menu__toggle > span:last-child { transform: rotate(45deg); }
	.has-js .primary-menu:not(.is-open) > .primary-nav { display: none; }
	.primary-nav { grid-template-columns: minmax(0, 1fr); width: calc(100% + var(--gutter) * 2); margin-left: calc(var(--gutter) * -1); border-top: 1px solid rgb(255 255 255 / 18%); }
	.primary-nav a, .primary-nav .nav-products { justify-content: flex-start; min-height: 48px; padding: .75rem var(--gutter); border-bottom: 1px solid rgb(255 255 255 / 13%); }
	.footer-main { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
	.header-top { grid-template-columns: minmax(0, 1fr); gap: .5rem; padding-block: .5rem; }
	.header-actions { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; width: 100%; }
	.header-search { width: auto; }
	.intro-grid { grid-template-columns: minmax(0, 1fr); padding-block: 2.5rem; }
	.intro-copy h1 { max-width: 650px; font-size: clamp(2rem, 6vw, 2.875rem); }
	.intro-description { max-width: 450px; }
	.brand-pattern { display: none; }
	.catalog-section { padding-block: 2rem 3rem; }
	.catalog-empty { gap: 1.5rem; min-height: 200px; padding: 1.5rem; }
	.catalog-empty__icon { flex-basis: 64px; width: 64px; height: 64px; }
	.footer-main { padding-block: 2.5rem 3rem; }
	.page-main, .shop-main { padding-block: 1.5rem 3rem; }
}
@media (max-width: 600px) {
	.header-top { min-height: 68px; }
	.site-brand img { width: 132px; }
	.header-actions > a span:not(.screen-reader-text), .header-search__button-label { display: none; }
	.header-actions > a { width: 38px; justify-content: center; }
	.header-product-search button { min-width: 44px; width: 44px; padding-inline: .5rem; }
	.footer-main { grid-template-columns: minmax(0, 1fr); gap: 2rem; }
}
@media (max-width: 420px) {
	.intro-copy h1 { font-size: clamp(1.625rem, 8vw, 2rem); }
	.test-notice__inner { flex-direction: column; align-items: start; gap: 0; padding-block: .5rem; font-size: .625rem; }
	.catalog-empty { flex-direction: column; align-items: start; gap: 1.25rem; }
	.catalog-empty__icon { flex-basis: 56px; width: 56px; height: 56px; }
	.section-heading { align-items: start; flex-direction: column; }
	.search-form { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
@media print {
	.test-notice, .primary-bar, .header-actions, .site-footer, .brand-pattern { display: none; }
	body { display: block; color: black; background: white; }
	.shell { width: 100%; }
	.site-header { margin-bottom: 1rem; }
}
