/* Дополнения к прототипу (style.css): серверные фильтры, пагинация, SEO-текст, формы. */

/* Переключатель города — ссылки на поддомены вместо кнопок */
.city-menu a{width:100%;padding:11px 8px;display:flex;justify-content:space-between;border-radius:5px;color:var(--ink);font-size:13px;font-weight:700}
.city-menu a:hover,.city-menu a.selected{background:#f3f7f9;color:var(--red)}
.city-menu a span{color:#b4bdc3}
.footer-city-switcher a{border:1px solid #5b6974;color:#fff;border-radius:999px;padding:7px 10px;font-size:11px;font-weight:700}
.footer-city-switcher a.selected,.footer-city-switcher a:hover{background:#fff;color:var(--red);border-color:#fff}

/* Скрытое поле-ловушка для ботов */
.hp-field{position:absolute!important;left:-9999px!important;width:1px;height:1px;overflow:hidden}

/* Вводный текст под H1 */
.hero-intro{max-width:760px;color:var(--muted);font-size:16px}
.hero-intro p{margin:0 0 8px;color:var(--muted)}

/* Популярные подборки (SEO-посадочные фильтров) */
.landing-links{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin-top:18px;font-size:12px}
.landing-links span{color:var(--muted);font-weight:700;margin-right:4px}
.landing-links a{padding:7px 12px;border-radius:999px;background:#f0f6f8;border:1px solid var(--line);font-weight:700;color:var(--slate)}
.landing-links a:hover{border-color:var(--red);color:var(--red)}

/* Листинг с фильтрами */
.catalog-layout{display:block}
.catalog-layout.has-filters{display:grid;grid-template-columns:270px minmax(0,1fr);gap:28px;align-items:start;margin-top:24px}
.catalog-layout.has-filters .product-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
.catalog-main{min-width:0}
.catalog-result-actions{display:flex;align-items:center;gap:10px}
.sort-select{display:flex;align-items:center;gap:8px;font-weight:700;color:var(--muted)}
.sort-select select{border:1px solid var(--line);border-radius:6px;padding:9px 10px;font:inherit;font-weight:700;color:var(--ink);background:#fff}
.filters-toggle{display:none;min-height:38px;padding:8px 14px}
.catalog-note{font-size:12px;color:#7e919a;margin:22px 0 0}

.filters-panel{position:sticky;top:16px;background:#f7fafc;border:1px solid var(--line);border-radius:9px;padding:6px 18px 14px;max-height:calc(100vh - 32px);overflow:auto}
.filters-head{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:14px 0 10px;border-bottom:1px solid var(--line)}
.filters-head strong{font-size:15px}
.filters-reset{font-size:12px;font-weight:800;color:var(--red)}
.filters-close{display:none;border:0;background:none;font-size:26px;line-height:1;color:var(--slate)}
.filter-group{border-bottom:1px solid var(--line);padding:12px 0}
.filter-group:last-child{border-bottom:0}
.filter-group summary{cursor:pointer;font-weight:800;font-size:13px;color:var(--slate);list-style:none;display:flex;justify-content:space-between}
.filter-group summary::-webkit-details-marker{display:none}
.filter-group summary:after{content:'⌄';color:#93a3ac;transition:transform .2s}
.filter-group[open] summary:after{transform:rotate(180deg)}
.filter-values{list-style:none;margin:10px 0 0;padding:0;display:grid;gap:2px}
.filter-values.is-collapsed .is-extra{display:none}
.filter-option{display:flex;align-items:center;gap:9px;padding:6px 4px;border-radius:5px;font-size:13px;color:var(--ink)}
a.filter-option:hover{background:#eef4f7;color:var(--red)}
.filter-check{flex:0 0 16px;width:16px;height:16px;border:1.5px solid #b7c6ce;border-radius:4px;background:#fff;position:relative}
.filter-option.is-selected .filter-check{background:var(--red);border-color:var(--red)}
.filter-option.is-selected .filter-check:after{content:'';position:absolute;left:4px;top:1px;width:5px;height:9px;border:solid #fff;border-width:0 2px 2px 0;transform:rotate(45deg)}
.filter-option.is-selected{font-weight:700}
.filter-label{flex:1;min-width:0;overflow-wrap:anywhere}
.filter-count{font-size:11px;color:#93a3ac}
.filter-option.is-empty{opacity:.45;cursor:default}
.filter-more{margin-top:6px;border:0;background:none;color:var(--red);font-size:12px;font-weight:800;padding:4px}
/* «Применить» — закреплена внизу панели, появляется, когда выбор отличается от текущего */
.filters-apply{position:sticky;bottom:-14px;z-index:2;display:grid;grid-template-columns:1fr auto;gap:8px;margin:8px -18px -14px;padding:12px 18px 14px;background:#f7fafc;border-top:1px solid var(--line);box-shadow:0 -10px 24px rgba(35,50,60,.08)}
.filters-apply .button{min-height:42px;padding:10px 14px;font-size:12px;gap:8px}
.filters-apply .button:hover{transform:none}

.active-filters{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 18px}
.active-filter{display:inline-flex;gap:8px;align-items:center;padding:7px 12px;border-radius:999px;background:var(--red);color:#fff;font-size:12px;font-weight:700}
.active-filter span{font-size:15px;line-height:1}
.active-filter.is-reset{background:#fff;color:var(--red);border:1px solid var(--red)}

/* Пагинация */
.pagination{display:flex;flex-wrap:wrap;align-items:center;gap:6px;margin-top:30px}
.page-link{min-width:40px;height:40px;padding:0 12px;display:inline-grid;place-items:center;border:1px solid var(--line);border-radius:6px;font-size:13px;font-weight:800;color:var(--slate);background:#fff}
a.page-link:hover{border-color:var(--red);color:var(--red)}
.page-link.is-current{background:var(--red);border-color:var(--red);color:#fff}
.page-gap{padding:0 4px;color:#93a3ac}

/* SEO-текст */
.seo-text-section{padding-top:10px}
.seo-text{border-top:1px solid var(--line);padding-top:34px}
/* Картинки в текстах (SEO-текст, описания): по центру, со скруглёнными углами; <figure> из редактора — без
   браузерных отступов 40px по бокам; подпись — мелким серым шрифтом */
.richtext::after{content:"";display:table;clear:both}
.richtext img{max-width:100%;height:auto;margin:24px auto;border-radius:14px}
.richtext figure{display:block;max-width:100%;margin:28px auto;text-align:center}
.richtext figure img{margin:0 auto}
.richtext figcaption{padding-top:10px;color:#7e8f99;font-size:13px;line-height:1.5}
.richtext .align-left,.richtext img[style*="float: left"]{float:left;max-width:50%;margin:6px 28px 16px 0}
.richtext .align-right,.richtext img[style*="float: right"]{float:right;max-width:50%;margin:6px 0 16px 28px}
.richtext .align-center{margin-left:auto;margin-right:auto}
@media(max-width:780px){
  .richtext .align-left,.richtext .align-right,.richtext img[style*="float"]{float:none!important;max-width:100%;margin:20px auto!important}
}
.seo-text ul,.seo-text ol{color:#556170;line-height:1.72;padding-left:20px}
.richtext a{color:var(--red);text-decoration:underline}
.richtext table{border-collapse:collapse;margin:16px 0}
.richtext td,.richtext th{border:1px solid var(--line);padding:8px 10px}

/* Формы */
.form-errors{background:#fff2f5;border:1px solid #f1c3cf;color:var(--red);border-radius:6px;padding:10px 12px;font-size:13px;font-weight:700}
.form-errors p{margin:0}
.validation-error{margin-top:2px}
.form-success{padding:32px;background:#fff;border:1px solid var(--line);border-radius:8px}
.form-success h3{font-size:24px;color:var(--slate)}
.form-success p{color:var(--muted);margin:0}
.button[disabled]{opacity:.5;cursor:not-allowed;transform:none}

/* Корзина */
.qty-controls .qty-input{width:64px;border:0;border-left:1px solid #d9e4e8;border-right:1px solid #d9e4e8;text-align:center;font-weight:800;font-size:13px;-moz-appearance:textfield;appearance:textfield}
.qty-controls .qty-input::-webkit-outer-spin-button,.qty-controls .qty-input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}
.cart-heading form{margin:0}
.cart-entry.is-removing{opacity:.4;pointer-events:none}

/* Контакты */
.contacts-content{margin-top:32px;max-width:980px}

/* Поиск */
.search-toolbar{margin-bottom:26px}
.search-toolbar .search-page-field{flex:0 1 420px;max-width:100%;margin:0}
.search-back{margin-top:30px}

@media(max-width:1300px){.catalog-layout.has-filters .product-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:1040px){
  .catalog-layout.has-filters{grid-template-columns:1fr}
  .catalog-layout.has-filters .product-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .filters-toggle{display:inline-flex}
  .filters-panel{position:fixed;inset:0 auto 0 0;width:min(360px,88vw);max-height:none;z-index:60;border-radius:0;transform:translateX(-105%);transition:transform .25s;box-shadow:0 0 60px #0003}
  .filters-panel.is-open{transform:none}
  .filters-panel{display:flex;flex-direction:column}
  .filters-panel>*{flex:none}
  .filters-apply{margin-top:auto}
  .filters-close{display:block}
  body.filters-open{overflow:hidden}
}
@media(max-width:780px){
  .catalog-result{flex-direction:column}
  .catalog-result-actions{width:100%;justify-content:space-between}
  .sort-select{font-size:11px}
}
@media(max-width:520px){.catalog-layout.has-filters .product-grid{grid-template-columns:1fr}}

/* Фокус полей: вместо стандартной обводки браузера — рамка фирменного цвета */
input, textarea, select { outline: none; transition: border-color .15s, box-shadow .15s; }
.request-form input:focus, .request-form textarea:focus,
.cart-checkout input:focus, .cart-checkout textarea:focus,
.detail-action input:focus, .sort-select select:focus { border-color: var(--red); box-shadow: 0 0 0 3px rgba(145, 0, 41, .12); }
.header-search, .search-field { transition: border-color .15s, box-shadow .15s; }
.header-search:focus-within, .search-field:focus-within { border-color: var(--red); box-shadow: 0 0 0 3px rgba(145, 0, 41, .12); }
.qty-controls:focus-within { border-color: var(--red); }
/* чекбоксы и выбор файлов: обводка только при навигации с клавиатуры */
input[type="checkbox"]:focus-visible, input[type="file"]:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }

/* Первый экран: картинка заканчивается по правому краю контейнера (как шапка), фон секции — на всю ширину */
.home-hero { grid-template-columns: minmax(0, 1fr) calc(min(1340px, 100vw - 80px) * .52); padding-right: calc((100% - min(1340px, 100% - 80px)) / 2); }
@media (max-width: 1300px) {
  .home-hero { grid-template-columns: minmax(0, 1fr) calc(min(1200px, 100vw - 52px) * .52); padding-right: calc((100% - min(1200px, 100% - 52px)) / 2); }
}
@media (max-width: 780px) {
  .home-hero { grid-template-columns: 1fr; padding-right: 0; }
}

/* Пометка «изображение сгенерировано ИИ»: маленький «!» в углу фото, подсказка при наведении / нажатии */
.product-card { position: relative; display: flex; flex-direction: column; }
/* Плитки ряда одной высоты: блок с ценой растягивается, цена и «+» прижаты к нижнему краю */
.product-card > .product-image { flex: none; }
.product-card-content { flex: 1 1 auto; }
.product-card-footer { margin-top: auto; }
.ai-badge { position: absolute; z-index: 2; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: rgba(255, 255, 255, .86); border: 1px solid rgba(57, 63, 75, .2); color: var(--slate); font: 800 12px/1 'Exo 2', 'Segoe UI', Arial, sans-serif; cursor: help; opacity: .8; transition: opacity .15s; }
.product-card > .ai-badge { top: 12px; left: 12px; }
.category-card > .ai-badge { top: 12px; left: 12px; z-index: 3; }
.detail-photo > .ai-badge { top: 16px; left: 18px; width: 26px; height: 26px; font-size: 13px; }
.ai-badge:hover, .ai-badge:focus { opacity: 1; outline: none; }
.ai-badge:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
.ai-badge::after { content: attr(data-tip); position: absolute; left: calc(100% + 8px); top: 50%; transform: translateY(-50%); white-space: nowrap; padding: 6px 9px; border-radius: 5px; background: var(--slate); color: #fff; font: 600 11px/1.2 'Exo 2', 'Segoe UI', Arial, sans-serif; box-shadow: 0 6px 18px rgba(0, 0, 0, .18); opacity: 0; pointer-events: none; transition: opacity .15s; }
.ai-badge:hover::after, .ai-badge:focus::after { opacity: 1; }

/* === Шапка: одна полоса — город слева, контакты справа === */
.citybar-inner{height:40px;font-size:13px}
.city-picker{min-width:0}
.city-toggle{gap:7px;padding:6px 0;font-size:13px;line-height:1;max-width:100%}
.city-toggle span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.city-toggle svg{display:block;flex:0 0 auto;fill:none;stroke:currentColor;stroke-linecap:round;stroke-linejoin:round}
.city-pin{width:18px;height:18px;color:var(--red);stroke-width:1.9}
.city-chevron{width:16px;height:16px;color:#7b8c96;stroke-width:2.2;transition:transform .2s}
.city-toggle[aria-expanded="true"] .city-chevron{transform:rotate(180deg)}
.city-toggle:hover span{color:var(--red)}
.city-menu{top:calc(100% + 6px)}
.city-contacts{gap:24px;flex:none}
.city-email{color:#5d6f7a;font-weight:700}
.city-phone{color:var(--slate);font-weight:800;white-space:nowrap}

.mobile-menu-toggle{width:42px;height:42px;padding:0;place-items:center;color:var(--slate)}
.mobile-menu-toggle svg{width:26px;height:26px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round}

/* === Мобильное меню: шторка справа; прокручивается только список, контакты закреплены снизу === */
.mobile-nav{display:none}
body.scroll-locked{overflow:hidden}
@media(max-width:1040px){
  .mobile-menu-toggle{display:grid;margin-right:-8px}
  .mobile-nav{display:block;position:fixed;inset:0;z-index:115;visibility:hidden;transition:visibility 0s linear .28s}
  .mobile-nav.is-open{visibility:visible;transition:none}
  .mobile-nav-backdrop{position:absolute;inset:0;background:rgba(18,26,34,.5);opacity:0;transition:opacity .28s}
  .mobile-nav.is-open .mobile-nav-backdrop{opacity:1}
  .mobile-nav-panel{position:absolute;top:0;right:0;bottom:0;width:min(440px,100%);display:flex;flex-direction:column;background:#fff;box-shadow:-20px 0 60px rgba(18,26,34,.18);transform:translateX(100%);transition:transform .28s ease}
  .mobile-nav.is-open .mobile-nav-panel{transform:none}
  .mobile-nav-head{flex:none;height:72px;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:0 17px;border-bottom:1px solid #e3e9ed}
  .mobile-nav-head .brand{flex:0 0 160px}
  .mobile-nav-head .brand img{width:160px}
  .mobile-nav-close{width:42px;height:42px;margin-right:-8px;display:grid;place-items:center;border:0;background:transparent;color:var(--slate)}
  .mobile-nav-close svg{width:26px;height:26px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round}
  .mobile-nav-body{flex:1 1 auto;min-height:0;overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;padding:18px 17px 22px}
  .mobile-nav .header-search{display:flex;flex:none;width:100%;min-width:0;max-width:none;margin-bottom:8px}
  .mobile-nav-links{display:flex;flex-direction:column}
  .mobile-nav-links>a{display:flex;align-items:center;gap:10px;padding:15px 2px;border-bottom:1px solid #edf2f5;font-size:17px;font-weight:800;color:var(--slate)}
  .mobile-nav-links>a::after{content:'';margin-left:auto;width:8px;height:8px;border:solid #a9b7bf;border-width:2px 2px 0 0;transform:rotate(45deg)}
  .mobile-nav-links>a.active{color:var(--red)}
  .mobile-nav-links>a:has(+ .mobile-nav-sub){border-bottom:0;padding-bottom:10px}
  .mobile-nav-sub{display:grid;grid-template-columns:1fr 1fr;gap:6px;padding:0 0 14px;border-bottom:1px solid #edf2f5}
  .mobile-nav-sub a{padding:10px 12px;border-radius:7px;background:#f3f7f9;font-size:14px;font-weight:700;color:#4b5866}
  .mobile-nav-sub a:active,.mobile-nav-sub a:hover{color:var(--red)}
  .mobile-nav-count{min-width:22px;height:22px;padding:0 6px;border-radius:11px;background:var(--red);color:#fff;font-size:12px;display:inline-grid;place-items:center}
  .mobile-nav-contacts{flex:none;display:grid;gap:3px;padding:16px 17px 18px;background:#f3f7f9;border-top:1px solid var(--line)}
  .mobile-nav-label{font-size:11px;font-weight:800;letter-spacing:.12em;text-transform:uppercase;color:var(--muted);margin-bottom:3px}
  .mobile-nav-phone{font-size:22px;font-weight:800;color:var(--slate);letter-spacing:-.01em}
  .mobile-nav-email{font-size:14px;font-weight:700;color:var(--red)}
  .mobile-nav-info{list-style:none;margin:8px 0 12px;padding:0;display:grid;gap:6px}
  .mobile-nav-info li{display:flex;align-items:flex-start;gap:9px;font-size:13px;line-height:1.4;color:#4b5866}
  .mobile-nav-info svg{flex:0 0 16px;width:16px;height:16px;margin-top:1px;fill:none;stroke:var(--red);stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
  .mobile-nav-contacts .button{min-height:48px}
}
@media(max-width:1040px) and (max-height:600px){
  .mobile-nav-info{display:none}
  .mobile-nav-contacts .button{margin-top:8px}
}
@media(prefers-reduced-motion:reduce){.mobile-nav,.mobile-nav-panel,.mobile-nav-backdrop{transition:none!important}}

/* === Cookie: одна кнопка === */
.cookie-banner{align-items:center}
.cookie-banner p{font-size:14px}
.cookie-banner p a{color:var(--red);text-decoration:underline;text-underline-offset:2px}
.cookie-banner .button{flex:none;min-width:150px;min-height:44px;padding:10px 22px}

/* Кнопка «Наверх» — в правом нижнем углу, но на ~1,5 своей высоты выше: ниже будет виджет живого чата (Jivo).
   Над баннером cookie поднимается ещё на его высоту (--cookie-offset из JS). Тост — левее кнопки, на той же высоте. */
:root{--corner-offset:96px}
.to-top{bottom:calc(var(--corner-offset) + var(--cookie-offset, 0px))}
.toast{bottom:calc(var(--corner-offset) + var(--cookie-offset, 0px));right:84px}
/* Нижний отступ подвала — чтобы плашка Jivo не закрывала копирайт и ссылки */
.site-footer .footer-bottom{padding-bottom:64px}

/* «Частые вопросы» под SEO-текстом */
.faq-section{padding-top:0}
.faq{border-top:1px solid var(--line);padding-top:34px}
.faq h2{font-size:clamp(26px,2.6vw,34px);margin:0 0 18px;color:var(--slate)}
.faq-item{border-bottom:1px solid var(--line)}
.faq-item summary{display:flex;justify-content:space-between;align-items:center;gap:16px;padding:18px 0;cursor:pointer;list-style:none;font-size:17px;font-weight:800;color:var(--slate)}
.faq-item summary::-webkit-details-marker{display:none}
.faq-item summary::after{content:'+';flex:none;width:30px;height:30px;display:grid;place-items:center;border:1px solid var(--line);border-radius:50%;color:var(--red);font-size:18px;line-height:1;transition:transform .2s}
.faq-item[open] summary::after{transform:rotate(45deg)}
.faq-item summary:hover{color:var(--red)}
.faq-answer{padding:0 46px 16px 0;color:#556170;line-height:1.72}
.faq-answer p{margin:0 0 10px}
@media(max-width:780px){.faq-item summary{font-size:15px}.faq-answer{padding-right:0}}

/* Подпись «Главный офис» над адресом (подвал, бургер-меню) — полупрозрачная, чтобы не спорить с адресом */
.main-office-label{display:block;margin-bottom:2px;opacity:.55;font-size:10px;font-weight:800;letter-spacing:.1em;text-transform:uppercase}

/* Стрелки в кружках (плитки категорий, угол фото товара, подсказки поиска) — SVG ровно по центру */
.circle-arrow svg,.image-corner svg,.search-suggestion-mark svg{display:block;width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}
.image-corner svg{width:15px;height:15px}

/* Количество с единицей: [ 3 ] мотка */
.qty-field{display:inline-flex;align-items:center;flex:none;border:1px solid var(--line);border-radius:5px;background:#fff;transition:border-color .15s,box-shadow .15s}
.qty-field:focus-within{border-color:var(--red);box-shadow:0 0 0 3px rgba(145,0,41,.12)}
.detail-action-row .qty-field input{width:56px;border:0;padding:12px 4px;background:transparent;font-weight:700;text-align:right}
.qty-field .qty-step{flex:none;align-self:stretch;width:44px;border:0;background:transparent;color:var(--slate);font-size:20px;line-height:1}
.qty-field .qty-step:first-child{border-right:1px solid var(--line)}
.qty-field .qty-step:last-child{border-left:1px solid var(--line)}
.qty-field .qty-step:hover{color:var(--red);background:#f6f9fb}
.detail-action-row .qty-field input:focus{box-shadow:none}
.qty-field .qty-unit{min-width:46px;padding:0 10px 0 4px;color:var(--muted);font-size:14px;font-weight:700;white-space:nowrap}
.detail-action label small{margin-left:6px;color:var(--muted);font-size:12px;font-weight:600}
.cart-entry-actions .qty-unit{margin-right:auto;color:var(--muted);font-size:13px;font-weight:700;white-space:nowrap}

/* Заголовок секции-ссылка (главная, «Каталог продукции») */
.heading-link{color:inherit;transition:color .15s}
.heading-link span{display:inline-block;color:var(--red);font-size:.7em;vertical-align:.15em;transition:transform .2s}
@media(hover:hover){.heading-link:hover{color:var(--red)}.heading-link:hover span{transform:translate(2px,-2px)}}

/* Форма в модалке — без второй рамки внутри окна */
.modal .request-form{padding:0;border:0}

/* «Как проходит заказ»: номер этапа */
.information-step{display:block;color:var(--red);font-size:13px;font-weight:800;letter-spacing:.12em;margin-bottom:10px}

/* Выбор файлов в формах — в стиле сайта */
.request-form input[type=file]::file-selector-button,.cart-checkout input[type=file]::file-selector-button{margin-right:12px;padding:8px 14px;border:1px solid #c9d6dd;border-radius:6px;background:#fff;color:var(--slate);font:700 13px 'Exo 2','Segoe UI',Arial,sans-serif;cursor:pointer}

/* Заголовок внутренних страниц (категории, фильтры, товары) — на всю ширину контейнера, без переноса на 850 px */
.inner-hero-line>div{flex:1;min-width:0}
.inner-hero h1{max-width:none}

/* Текстовые страницы (оферта, политика): на всю ширину контейнера, от левого края, как заголовок */
.legal-page .container{max-width:none}
.legal-content{max-width:none}

/* Длинные слова в заголовках («конфиденциальности») не вылезают за экран */
h1,h2,h3{overflow-wrap:break-word}

/* === Мобильная версия === */
@media(max-width:780px){
  .citybar-inner{height:38px}
  .city-email{display:none}
  :root{--corner-offset:86px}
  .to-top{right:14px}
  .toast{left:14px;right:74px;text-align:center}
  /* iOS увеличивает страницу при фокусе на поле со шрифтом меньше 16 px */
  input:not([type=checkbox]):not([type=radio]):not([type=file]),textarea,select{font-size:16px!important}
  .cookie-banner{gap:12px;padding:16px;align-items:stretch}
  .cookie-banner p{font-size:13px;margin-top:4px}
  .cookie-banner .button{width:100%}
  .end-cta:after{width:60px}
  .end-cta .container>div{padding-right:44px}
  .modal{padding:12px}
  .modal-dialog{padding:24px 18px;max-height:calc(100vh - 24px);max-height:calc(100dvh - 24px)}
  .modal-dialog h2{font-size:28px;padding-right:28px}
  .modal-close{top:8px;right:8px}
  .site-footer .footer-top{padding:46px 0 36px}
  .detail-columns,.detail-info-grid{grid-template-columns:minmax(0,1fr)}
  .info-panel dt,.info-panel dd{min-width:0;overflow-wrap:anywhere}
}
@media(max-width:520px){
  .eyebrow{letter-spacing:.12em}
  .eyebrow:before{width:18px;margin-right:10px}
  .inner-hero h1{font-size:clamp(28px,8.6vw,37px)}
  .legal-content h2,.richtext h2{font-size:clamp(22px,7.8vw,28px)}
  .catalog-result-actions{gap:10px}
  .sort-label{display:none}
  .sort-select{flex:1;min-width:0}
  .sort-select select{width:100%;min-width:0}
  .steps-grid{gap:12px}
  .steps-grid>div{display:grid;grid-template-columns:auto 1fr;column-gap:16px;padding:18px 18px 14px}
  .steps-grid span{grid-row:span 2;font-size:26px;line-height:1}
  .steps-grid h3{margin:0 0 6px;font-size:17px}
  .information-card{padding:22px 20px}
  .info-panel{padding:22px 18px}
  .footer-top{grid-template-columns:1fr 1fr;gap:30px 20px}
  .footer-top>div:first-child,.footer-contact{grid-column:1/-1}
}
/* Карточки товаров на телефонах — две колонки, компактно */
@media(min-width:360px) and (max-width:520px){
  .product-grid,.related-grid,.catalog-layout.has-filters .product-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
  .product-image{height:150px}
  .image-corner{top:8px;right:8px;width:26px;height:26px;font-size:13px}
  .product-card-content{min-height:0;padding:12px 12px 14px}
  .item-category{font-size:10px}
  .product-name{font-size:15px;margin:6px 0 12px;overflow-wrap:break-word;hyphens:auto}
  .product-card-footer{gap:6px}
  .product-card-footer small{font-size:10px}
  .product-card-footer strong{font-size:14px}
  .add-mini{width:34px;height:34px;font-size:19px;flex:none}
  .product-card>.ai-badge{top:8px;left:8px}
  .ai-badge::after{white-space:normal;width:max-content;max-width:130px}
}

/* Баннеры и фото «О компании»: значок «!» — фото сгенерированы ИИ */
.hero-visual > .ai-badge, .dark-feature-img > .ai-badge, .about-mosaic > .ai-badge { top: 16px; left: 16px; z-index: 3; }
.hero-visual > picture { position: absolute; inset: 0; }
.hero-visual > picture > img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.85) contrast(1.07); }

/* «О компании»: три фото — широкое сверху, два снизу */
.about-mosaic { position: relative; display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1.55fr 1fr; gap: 10px; background: transparent; }
.about-mosaic > img { width: 100%; height: 100%; min-height: 0; object-fit: cover; border-radius: 9px; }
.about-mosaic > img:first-child { grid-column: 1 / -1; }
