/* Ваши стили. Этот файл не перезаписывается обновлениями темы.
   Токены темы можно переопределить здесь целиком:

   :root {
       --f-accent: #d7263d;
       --f-font: "Inter", system-ui, sans-serif;
       --f-radius: 0;
   }

   ------------------------------------------------------------------
   РЕЦЕПТ: чужой плавающий виджет перекрывает кнопки

   Чат, «Подписаться», обратный звонок и прочие круглые кнопки висят
   поверх страницы и на телефоне наезжают на панель покупки. Тема
   поднимает такие блоки на высоту --f-float-safe (величина берётся из
   настройки «Место для плавающих виджетов»), но знает не про каждый
   сервис. Свой добавьте одной строкой — селектор смотрите в инспекторе
   браузера:

   .ваш-класс-виджета {
       transform: translateY(calc(-1 * var(--f-float-safe)));
       transition: transform .2s ease;
   }

   Либо повесьте на элемент виджета атрибут data-f-float-safe (например,
   из custom.js) — тогда правило темы применится само.
   ------------------------------------------------------------------
   РЕЦЕПТ: типографика длинных текстов

   Описания товаров и разделов, информационные страницы и отзывы верстает
   класс .f-usercontent. Ширину строки, кегль и межстрочный интервал
   меняют переменные и правила:

   .f-usercontent { --f-measure: 76ch; font-size: 1.125rem; line-height: 1.7; }
   ------------------------------------------------------------------
   РЕЦЕПТ: баннеры в категориях

   Тема объявляет три места (зоны), но не хранит сами кампании — их
   ставит промо-плагин или ваш custom.js:

   [data-f-zone="category-top"]    — перед товарной выдачей;
   [data-f-zone="category-feed"]   — внутри выдачи, после второго ряда;
   [data-f-zone="category-bottom"] — под выдачей, перед страницами.

   У верхней зоны есть data-category-id — по нему выбирают, что показать
   в конкретной категории. Зоны внутри выдачи приходят тем же фрагментом,
   что и товары, поэтому переживают фильтрацию и сортировку.

   Первую (верхнюю) картинку грузите приоритетно — fetchpriority="high",
   остальным ставьте loading="lazy" и указывайте width/height: иначе
   баннеры испортят LCP и сдвинут вёрстку.
   ------------------------------------------------------------------ */

/* Easy2Bike: новости — картинки не шире текста и не выше 360px в списке */
.f-post-card img { display: block; max-width: 100%; max-height: 360px; width: auto; height: auto; border-radius: 12px; margin: 8px 0; }
.f-blog article img, .f-post img { max-width: 100%; height: auto; border-radius: 12px; }
.f-post-card h3, .f-post h3 { margin: 1.4em 0 .4em; font-size: 1.15em; }
.f-post-card ul, .f-post-card ol { padding-left: 1.3em; }

/* Easy2Bike: карусель фотографий в новостях (собирается скриптом из custom.js) */
.e2b-gallery { position: relative; margin: 16px 0; }
.e2b-gallery__track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; border-radius: 12px; background: rgba(0, 0, 0, .04); }
.e2b-gallery__track::-webkit-scrollbar { display: none; }
.e2b-gallery__slide { flex: 0 0 100%; scroll-snap-align: center; display: flex; align-items: center; justify-content: center; height: min(420px, 62vw); }
.e2b-gallery__slide img, .f-post-card .e2b-gallery__slide img { max-width: 100%; max-height: 100%; width: auto; height: auto; margin: 0; border-radius: 0; object-fit: contain; }
.e2b-gallery__btn { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .92); color: #111; font-size: 26px; line-height: 1; cursor: pointer; box-shadow: 0 2px 10px rgba(0, 0, 0, .18); }
.e2b-gallery__btn--prev { left: 10px; }
.e2b-gallery__btn--next { right: 10px; }
.e2b-gallery__btn:disabled { opacity: .35; cursor: default; }
.e2b-gallery__btn:focus-visible, .e2b-gallery__track:focus-visible { outline: 2px solid var(--f-accent, #F26722); outline-offset: 2px; }
.e2b-gallery__count { position: absolute; right: 12px; bottom: 10px; padding: 2px 10px; border-radius: 999px; background: rgba(0, 0, 0, .6); color: #fff; font-size: 13px; }

/* Easy2Bike: шапка в три уровня — служебная строка, основная строка, строка каталога */
.e2b-servicebar { border-bottom: 1px solid var(--f-line, rgba(0, 0, 0, .08)); font-size: 13px; }
.e2b-servicebar__row { display: flex; justify-content: flex-end; align-items: center; flex-wrap: wrap; gap: 4px 22px; min-height: 34px; }
.e2b-servicebar__link { color: var(--f-ink-soft, #5b6470); text-decoration: none; white-space: nowrap; }
.e2b-servicebar__link:hover { color: var(--f-accent, #F26722); }
.e2b-servicebar__link--accent { color: var(--f-accent, #F26722); font-weight: 600; }
.f-header[data-nav="plain"] .f-nav__link { font-weight: 600; }
.f-header[data-nav="plain"] .f-nav__link:hover, .f-header[data-nav="plain"] .f-nav__item:focus-within > .f-nav__link { color: var(--f-accent, #F26722); box-shadow: inset 0 -2px 0 var(--f-accent, #F26722); }
.f-menu > li.e2b-menu-sep { border-top: 1px solid var(--f-line, rgba(0, 0, 0, .12)); margin-top: 10px; padding-top: 10px; }
.f-menu > li.e2b-menu-phone a { font-weight: 600; }
@media (max-width: 760px) { .e2b-servicebar { display: none; } }

/* Easy2Bike: подсказки поиска и уточнение по категориям */
form.f-search { position: relative; }
.e2b-suggest { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 60; max-height: min(70vh, 560px); overflow: auto; padding: 8px; border-radius: 16px; background: var(--f-surface, #fff); color: var(--f-ink, #1c2430); box-shadow: 0 12px 40px rgba(0, 0, 0, .18); text-align: left; }
.e2b-suggest.is-loading { opacity: .7; }
.e2b-suggest__title { padding: 10px 10px 4px; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--f-ink-soft, #6b7480); }
.e2b-suggest__item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; color: inherit; text-decoration: none; }
.e2b-suggest__item:hover, .e2b-suggest__item.is-active { background: rgba(242, 103, 34, .09); }
.e2b-suggest__cat { flex-direction: column; align-items: flex-start; gap: 0; }
.e2b-suggest__cat small { color: var(--f-ink-soft, #6b7480); font-size: 12px; }
.e2b-suggest__chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 4px 6px 6px; }
.e2b-suggest__chip { padding: 6px 12px; border: 1px solid var(--f-line, rgba(0, 0, 0, .12)); border-radius: 999px; font-size: 14px; }
.e2b-suggest__chip span, .e2b-refine__chip span { color: var(--f-ink-soft, #6b7480); font-size: .9em; margin-left: 2px; }
.e2b-suggest__product img, .e2b-suggest__noimg { flex: 0 0 44px; width: 44px; height: 44px; object-fit: contain; border-radius: 8px; background: #fff; }
.e2b-suggest__name { flex: 1 1 auto; font-size: 14px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.e2b-suggest__price { flex: 0 0 auto; font-weight: 600; white-space: nowrap; }
.e2b-suggest__all { margin-top: 4px; justify-content: center; font-weight: 600; color: var(--f-accent, #F26722); }
.e2b-suggest__empty { padding: 14px 10px; color: var(--f-ink-soft, #6b7480); }
.e2b-refine { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 4px 0 18px; }
.e2b-refine__label { font-weight: 600; margin-right: 4px; }
.e2b-refine__loading { color: var(--f-ink-soft, #6b7480); font-size: 14px; }
.e2b-refine__chip { padding: 7px 14px; border: 1px solid var(--f-line, rgba(0, 0, 0, .12)); border-radius: 999px; background: var(--f-surface, #fff); color: inherit; font: inherit; font-size: 14px; cursor: pointer; }
.e2b-refine__chip:hover { border-color: var(--f-accent, #F26722); }
.e2b-refine__chip.is-active { background: var(--f-accent, #F26722); border-color: var(--f-accent, #F26722); color: #fff; }
.e2b-refine__chip.is-active span { color: rgba(255, 255, 255, .85); }

.e2b-refine { flex-direction: column; align-items: stretch; }
.e2b-refine__row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.e2b-refine__row--sub { padding-top: 6px; font-size: 14px; }
.e2b-refine__row--sub .e2b-refine__label { font-weight: 500; color: var(--f-ink-soft, #6b7480); }
.e2b-refine__row--sub .e2b-refine__chip { padding: 5px 12px; font-size: 13px; }

/* Easy2Bike: белый фон под фото товаров (у многих фото прозрачный фон) */
.f-card__image,
.f-product__gallery,
.f-product__photo-btn,
.f-product__gallery [class*="thumb"],
.f-quick .f-product__gallery { background: #fff !important; }
.f-card__image { box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .05); }

/* товар без фото: белый фон и бледный велосипед из логотипа */
.f-card__noimage { position: relative; background: #fff !important; }
.f-card__noimage::after { content: ""; position: absolute; inset: 0; background: url("/wa-data/public/site/img/e2b-favicon.png") center / 38% no-repeat; opacity: .18; }

/* фото товара: белый фон и под самой картинкой (убирает цветные полосы над и под фото) */
.f-product__photo, .f-lightbox__slide img { background: #fff !important; }

/* Easy2Bike: стрелки листания у горизонтальной ленты товаров (главная, допродажи).
   Кнопки добавляет custom.js; на сенсорных экранах скрыты — там лента листается пальцем. */
.e2b-rail-wrap { position: relative; min-width: 0; }
.e2b-rail-wrap > .f-rail { height: 100%; }
.e2b-rail-btn { position: absolute; top: 50%; z-index: 3; display: none; align-items: center; justify-content: center; width: 44px; height: 44px; margin-top: -22px; padding: 0; border: 0; border-radius: 50%; background: #fff; color: #1a1a1a; box-shadow: var(--f-shadow-pop, rgb(0 0 0 / 12%) 0 4px 24px 0); cursor: pointer; transition: transform .2s ease; }
.e2b-rail-btn svg { width: 20px; height: 20px; }
.e2b-rail-btn--prev { left: 10px; }
.e2b-rail-btn--next { right: 10px; }
.e2b-rail-btn:hover { transform: scale(1.08); }
.e2b-rail-btn:focus-visible { outline: 2px solid var(--f-accent, #f26a21); outline-offset: 2px; }
.e2b-rail-btn[hidden] { display: none !important; }
@media (hover: hover) and (pointer: fine) { .e2b-rail-btn { display: flex; } }

/* Easy2Bike: прилипшая шапка ниже обычной — возвращаем разницу отступом, чтобы страница не прыгала.
   Величину считает custom.js (блок e2b-header-jump). */
.f-header.is-stuck { margin-bottom: var(--e2b-hdr-lost, 0px); }
