/* ---------------------------------------------------------------------------
   АгроДояр — адаптивный слой поверх FoxStore.
   Тема сверстана таблицами (.s-layout{display:table} + .s-column{display:table-cell})
   и жёстко упирается в .s-main-wrapper{min-width:995px}. Файл подключается
   последним и переводит раскладку в поток на экранах уже 1024px.
   Правки только здесь — авторский custom.css не трогаем.
   --------------------------------------------------------------------------- */

:root{
  --ad-accent:#43A047;
  --ad-accent-dark:#1B5E20;
  --ad-ink:#20242a;
  --ad-muted:#6b7280;
  --ad-line:#e6e8eb;
  --ad-bg:#f5f6f7;
  --ad-radius:12px;
  --ad-shadow:0 2px 10px rgba(16,24,32,.08);
  --ad-header-h:56px;
  --ad-safe-b:env(safe-area-inset-bottom,0px);
}

/* Элементы мобильного интерфейса не существуют на десктопе */
.ad-mobile-bar,.ad-drawer,.ad-scrim,.ad-search-panel,.ad-tabbar{display:none;}

/* Внутри медиазапроса этим блокам задан display:flex/block, а он перебивает
   браузерное [hidden]{display:none}. Без этой строки шторка видна всегда. */
.ad-drawer[hidden],.ad-scrim[hidden],.ad-search-panel[hidden]{display:none!important;}

/* ===========================================================================
   ПЛАНШЕТ И НИЖЕ
   =========================================================================== */
@media (max-width:1023px){

  /* --- разблокировка каркаса ------------------------------------------- */
  html{-webkit-text-size-adjust:100%;}
  .s-main-wrapper{min-width:0!important;}
  .s-main-wrapper .s-main-block{max-width:none;box-shadow:none;}
  /* height:auto обязателен: тема задаёт `.s-layout.fixed{height:43px}`.
     У display:table это минимум и ячейка в 300px спокойно растягивает таблицу,
     а после перевода в block высота становится жёсткой — фото товара
     вываливается из фигуры, и на него наезжают табы. */
  .s-layout,.s-layout.fixed,.s-layout.is-adaptive{
    display:block!important;width:100%;height:auto!important;min-height:0;
  }
  .s-layout>.s-column,.s-column{display:block!important;width:auto!important;
    vertical-align:top;float:none!important;}
  img,video,iframe,table{max-width:100%;}
  body{background:var(--ad-bg);}

  /* Декоративные фоновые баннеры темы по бокам — на узком экране это мусор */
  .s-main-wrapper .s-branding-wrapper{display:none!important;}

  /* Верхняя тёмная полоса: ссылки на страницы дублируют шторку — убираем,
     оставляем только строку с доставкой и графиком */
  .top_menu .nav.navbar-nav{display:none!important;}
  .top_menu .top_style{padding:0!important;text-align:left!important;}
  .top_menu .s-column.right{padding:0!important;}
  .top_menu .s-shop-info{
    display:flex;flex-wrap:wrap;gap:4px 14px;align-items:center;
    padding:7px 12px;font-size:11.5px;line-height:1.3;
  }
  .top_menu .s-shop-info .s-shop-address,
  .top_menu .s-shop-info .s-schedule-wrapper,
  .top_menu .s-shop-info .s-time-wrapper{margin:0!important;padding:0!important;}
  /* выпадашка с расписанием на тач-экране только мешает */
  .top_menu .s-shop-info .s-hidden{display:none!important;}

  /* --- прячем десктопную шапку и подвальную мелочь ----------------------- */
  .s-header-wrapper .s-header-section,
  .s-header-wrapper .s-header-bottom,
  .s-header-wrapper .s-header-nav{display:none!important;}

  /* --- мобильная шапка --------------------------------------------------- */
  .ad-mobile-bar{
    display:flex;align-items:center;gap:6px;
    position:sticky;top:0;z-index:900;
    height:var(--ad-header-h);padding:0 8px;
    background:#fff;border-bottom:1px solid var(--ad-line);
    box-shadow:0 1px 6px rgba(16,24,32,.06);
  }
  .ad-mobile-bar__logo{display:flex;align-items:center;margin-right:auto;padding:0 4px;}
  .ad-mobile-bar__logo img{height:32px;width:auto;display:block;}
  /* !important обязателен: green.css задаёт `button{color:#fff!important}`,
     а custom.css — `button{height:32px;padding:1px 16px 0}`. Без этого
     бургер и лупа рисуются белым по белому на зелёной подложке. */
  .ad-icon-btn{
    display:inline-flex!important;align-items:center;justify-content:center;
    width:44px!important;height:44px!important;flex:0 0 44px;   /* тап-таргет 44px */
    border:0!important;background:none!important;padding:0!important;
    margin:0!important;cursor:pointer;box-shadow:none!important;
    color:var(--ad-ink)!important;position:relative;border-radius:10px;
    -webkit-tap-highlight-color:transparent;
  }
  .ad-icon-btn:hover,.ad-icon-btn:focus{background:none!important;color:var(--ad-ink)!important;}
  .ad-icon-btn:active{background:rgba(0,0,0,.06)!important;}
  /* stroke задаём явно, а не через currentColor: тема перебивает color */
  .ad-icon-btn svg{width:23px!important;height:23px!important;
    stroke:#20242a;fill:none;
    stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round;}
  .ad-icon-btn__count{
    position:absolute;top:5px;right:4px;min-width:17px;height:17px;padding:0 4px;
    border-radius:9px;background:var(--ad-accent);color:#fff;
    font:600 11px/17px -apple-system,"Segoe UI",Roboto,sans-serif;text-align:center;
  }
  .ad-icon-btn__count:empty,.ad-icon-btn__count[data-count="0"]{display:none;}

  /* --- выдвижная панель поиска ------------------------------------------ */
  .ad-search-panel{
    display:block;position:fixed;top:0;left:0;right:0;z-index:1000;
    background:#fff;padding:8px;box-shadow:var(--ad-shadow);
    transform:translateY(-100%);transition:transform .22s ease;
  }
  .ad-search-panel.is-open{transform:none;}
  .ad-search-panel form{display:flex;gap:8px;align-items:center;}
  .ad-search-panel input[type="search"]{
    flex:1;height:44px;padding:0 14px;font-size:16px;   /* 16px — иначе iOS зумит */
    border:1px solid var(--ad-line);border-radius:10px;background:#fff;color:var(--ad-ink);
  }
  .ad-search-panel input[type="search"]:focus{outline:2px solid var(--ad-accent);outline-offset:-2px;}
  .ad-search-panel__close{flex:0 0 auto;height:44px;padding:0 14px;border:0;
    background:none;color:var(--ad-muted);font-size:15px;cursor:pointer;}

  /* --- шторка каталога --------------------------------------------------- */
  .ad-scrim{
    display:block;position:fixed;inset:0;z-index:990;background:rgba(16,24,32,.45);
    opacity:0;pointer-events:none;transition:opacity .22s ease;
  }
  .ad-scrim.is-open{opacity:1;pointer-events:auto;}
  .ad-drawer{
    display:flex;flex-direction:column;
    position:fixed;top:0;bottom:0;left:0;z-index:1001;
    width:min(86vw,360px);background:#fff;
    transform:translateX(-100%);transition:transform .24s cubic-bezier(.4,0,.2,1);
    box-shadow:4px 0 24px rgba(16,24,32,.18);
  }
  .ad-drawer.is-open{transform:none;}
  .ad-drawer__head{
    display:flex;align-items:center;justify-content:space-between;
    padding:12px 8px 12px 16px;border-bottom:1px solid var(--ad-line);flex:0 0 auto;
  }
  .ad-drawer__title{font:600 16px/1.2 inherit;color:var(--ad-ink);}
  .ad-drawer__body{flex:1;overflow-y:auto;-webkit-overflow-scrolling:touch;
    overscroll-behavior:contain;padding-bottom:calc(16px + var(--ad-safe-b));}
  .ad-drawer__foot{flex:0 0 auto;border-top:1px solid var(--ad-line);padding:14px 16px;
    padding-bottom:calc(14px + var(--ad-safe-b));background:#fafbfc;}
  .ad-drawer__phone{display:block;font:700 18px/1.3 inherit;color:var(--ad-ink);
    text-decoration:none;}
  .ad-drawer__note{display:block;margin-top:2px;font-size:12px;color:var(--ad-muted);}

  /* Дерево каталога внутри шторки: тема отдаёт ul.s-catalog-list */
  /* Клон приезжает со стилями десктопной выпадашки — у .s-catalog-list
     тёмный фон #2d2d2d, на котором тёмный текст ссылок не читается */
  .ad-drawer .s-catalog-list,.ad-drawer .s-sub-list{
    list-style:none;margin:0;padding:0;background:#fff!important;
    border:0!important;box-shadow:none!important;width:auto!important;
  }
  .ad-drawer .s-sub-wrapper{
    position:static!important;background:#fafbfc!important;
    width:auto!important;min-width:0!important;box-shadow:none!important;border:0!important;
  }
  .ad-drawer .s-catalog-list>li{border-bottom:1px solid var(--ad-line);}
  .ad-drawer .ad-row{display:flex;align-items:stretch;}
  .ad-drawer .ad-row>a,
  .ad-drawer .s-catalog-list>li>a{
    display:block;flex:1 1 auto;min-width:0;
    padding:15px 8px 15px 16px;color:var(--ad-ink);
    font-size:15px;line-height:1.35;text-decoration:none;
  }
  .ad-drawer .ad-row>a:active,
  .ad-drawer .s-catalog-list>li>a:active{background:#f2f4f5;}
  /* стрелка-раскрывашка для веток с подкатегориями */
  .ad-drawer .ad-expand{
    flex:0 0 44px;width:44px!important;height:auto!important;align-self:stretch;
    border:0!important;background:none!important;padding:0!important;
    margin:0!important;box-shadow:none!important;cursor:pointer;
    display:flex!important;align-items:center;justify-content:center;
  }
  /* stroke явным цветом: тема задаёт button{color:#fff!important},
     из-за чего currentColor делает стрелку белой на белом */
  .ad-drawer .ad-expand svg{width:16px!important;height:16px!important;
    stroke:#6b7280;fill:none;
    stroke-width:2;stroke-linecap:round;stroke-linejoin:round;transition:transform .2s;}
  .ad-drawer li.is-expanded .ad-row .ad-expand svg{transform:rotate(180deg);}
  .ad-drawer .s-sub-wrapper{display:none;background:#fafbfc;}
  .ad-drawer li.is-expanded>.s-sub-wrapper{display:block;}
  .ad-drawer .s-sub-list .s-sub-item a{
    display:block;padding:12px 16px 12px 30px;color:#3c4149;font-size:14px;
    line-height:1.35;text-decoration:none;border-top:1px solid var(--ad-line);
  }
  .ad-drawer .s-sub-list .s-sub-item a:active{background:#eef0f1;}
  .ad-drawer__links{list-style:none;margin:0;padding:8px 0;}
  .ad-drawer__links a{display:block;padding:12px 16px;color:var(--ad-muted);
    font-size:14px;text-decoration:none;}

  body.ad-locked{overflow:hidden;}

  /* --- контент ----------------------------------------------------------- */
  .s-main-wrapper .s-main-block .s-sidebar-wrapper{
    width:auto!important;padding:0 12px;
  }
  .s-main-wrapper .s-main-block .s-sidebar-wrapper+.s-content-wrapper{padding-left:0;}
  .s-content-wrapper{padding:0 12px;}
  .s-content-block{padding:0;}

  /* Сайдбар уезжает под контент: на телефоне баннеры и новости — не первое,
     что нужно показать, а фильтры вытаскиваются отдельной кнопкой */
  .s-layout>.s-sidebar-wrapper{order:2;}
  .s-layout:has(>.s-sidebar-wrapper){display:flex!important;flex-direction:column;}
  .s-layout>.s-content-wrapper{order:1;}

  .s-global-header,h1.s-global-header{
    font-size:22px;line-height:1.25;margin:14px 12px 10px;color:var(--ad-ink);
  }
  .s-breadcrumbs-wrapper{
    padding:10px 12px;margin:0;font-size:12px;color:var(--ad-muted);
    white-space:nowrap;overflow-x:auto;-webkit-overflow-scrolling:touch;
    scrollbar-width:none;
  }
  .s-breadcrumbs-wrapper::-webkit-scrollbar{display:none;}
  .s-breadcrumbs-wrapper .s-item{display:inline;}

  /* --- сетка товаров ------------------------------------------------------ */
  .s-products-wrapper .s-products-list.thumbs-view,
  .s-products-wrapper .s-products-list.is-short{
    display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));
    gap:10px;margin:0;padding:0;list-style:none;
  }
  .s-products-wrapper .s-products-list.thumbs-view .s-product-wrapper,
  .s-products-wrapper .s-products-list.is-short .s-product-wrapper{
    width:auto!important;margin:0!important;display:block;border:0!important;
    background:#fff;border-radius:var(--ad-radius);overflow:hidden;
    box-shadow:var(--ad-shadow);
  }
  .thumbs-view .s-product-wrapper:nth-child(4n){border:0;}
  .s-products-list .s-product-wrapper .s-product-block{border:0!important;padding:10px;}
  .s-products-list .s-product-wrapper .s-image-wrapper{
    height:140px!important;line-height:140px!important;
  }
  .s-products-list .s-product-wrapper .s-image-wrapper img{
    max-height:100%;width:auto;object-fit:contain;
  }
  .s-products-list .s-product-wrapper .s-product-header{
    font-size:13px;line-height:1.3;min-height:2.6em;overflow:hidden;
  }
  .s-products-list .s-product-wrapper .s-product-header a{color:var(--ad-ink);}
  /* краткое описание в плитке на телефоне только шумит */
  .s-products-list .s-product-wrapper .s-product-description,
  .s-products-list .s-product-wrapper .s-rating-wrapper{display:none;}
  .s-products-list .s-product-wrapper .s-price-wrapper .s-price{
    font-size:16px;font-weight:700;color:var(--ad-ink);
  }
  .s-products-list .s-product-wrapper .s-price-wrapper .s-compare{
    font-size:12px;color:var(--ad-muted);text-decoration:line-through;
  }
  .s-products-list .s-product-wrapper .s-actions-wrapper .s-cart-button,
  .s-products-list .s-product-wrapper .s-buttons-wrapper .s-add2cart{
    width:100%;min-height:40px;border-radius:8px;
  }

  /* --- карточка товара ---------------------------------------------------- */
  /* Каркас карточки держится на плавающих блоках с пиксельными ширинами:
     .s-column.w3 483px (table-cell), .s-pr 655px, .info_blok float:left 270px,
     .s-product-cart float:right 310px. На узком экране они наезжают друг
     на друга — распускаем всё в поток и чистим обтекание. */
  .s-product-page{background:#fff;border-radius:var(--ad-radius);
    padding:12px;box-shadow:var(--ad-shadow);}
  .s-product-page .s-layout.fixed,
  .s-product-page .s-column.w3,
  .s-product-page .s-pr,
  .s-product-page .info_blok,
  .s-product-page .s-product-cart-area,
  .s-product-page .s-product-cart,
  .s-product-page .s-summary,
  .s-product-page .s-stocks-wrapper,
  .s-product-page .ya-share2{
    display:block!important;float:none!important;
    width:auto!important;max-width:none!important;margin-left:0;margin-right:0;
  }
  .s-product-page .s-pr::after,
  .s-product-page .s-product-cart-area::after{content:"";display:table;clear:both;}
  .s-product-page .info_blok{margin-bottom:14px;}
  /* цена и кнопка «Купить» — крупным блоком, а не таблицей в 310px */
  .s-product-page .s-product-cart .s-cart-header,
  .s-product-page .s-product-cart .s-price-wrapper{
    display:block!important;width:auto!important;
  }
  .s-product-page .s-product-cart .s-price-wrapper .s-price{font-size:26px;font-weight:700;}
  .s-product-page .s-cart-footer .s-layout,
  .s-product-page .s-cart-footer .s-column{display:block!important;width:auto!important;}
  .s-product-page .s-cart-footer .s-button-wrapper .s-submit-button,
  .s-product-page .s-cart-footer .s-submit-button{width:100%;min-height:50px;border-radius:10px;}
  .s-product-page .ya-share2{margin:10px 0;}

  /* табы: 3 штуки по 122px не влезают — пускаем горизонтальной лентой */
  .tabs-container .tabs{
    display:flex!important;flex-direction:row!important;flex-wrap:nowrap!important;
    overflow-x:auto;-webkit-overflow-scrolling:touch;
    scrollbar-width:none;margin:0;padding:0;
  }
  .tabs-container .tabs::-webkit-scrollbar{display:none;}
  .tabs-container .tabs li{flex:0 0 auto;width:auto!important;}
  .tabs-container .tabs li a{display:block;padding:0 18px;white-space:nowrap;
    min-height:44px;line-height:44px;font-size:14px;}
  .tabs-content{width:auto!important;}

  .s-product-page .s-product-photos .s-layout.fixed{display:block!important;}
  .s-product-page .s-product-photos .s-photo-main a{height:260px;line-height:260px;}
  .s-product-page .s-product-photos .s-photo-main img{max-height:100%;width:auto;
    object-fit:contain;}
  .s-product-page .s-photos-list{display:flex;gap:8px;overflow-x:auto;
    padding:10px 0 2px;margin:0;list-style:none;-webkit-overflow-scrolling:touch;}
  .s-product-page .s-photos-list .s-photo-thumb{flex:0 0 auto;}
  .s-product-page h1,.s-product-page .s-global-header{font-size:20px;line-height:1.28;}
  .s-product-page .s-features-table,.s-product-page table{width:100%;
    display:block;overflow-x:auto;-webkit-overflow-scrolling:touch;}
  .s-product-page .s-user-content img{height:auto;}

  /* --- слайдер на главной ------------------------------------------------- */
  /* Текстовый блок слайда — display:table шириной 111px: на телефоне текст
     ломается по два слова и вылезает за слайд (514px при высоте слайда 420).
     Разворачиваем в обычный блок поверх картинки с затемнением. */
  .s-slider-section .s-slide-list .s-slide-wrapper .s-text-wrapper,
  .s-slider-section .s-slide-list .s-slide-wrapper .s-text-block{
    display:block!important;width:auto!important;height:auto!important;
  }
  .s-slider-section .s-slide-wrapper .s-slide-block{overflow:hidden;border-radius:var(--ad-radius);}
  .s-slider-section .s-slide-wrapper .s-text-wrapper{
    position:absolute!important;left:0;right:0;bottom:0;z-index:2;
    padding:16px 16px 18px;
    background:linear-gradient(to top,rgba(12,18,14,.92) 0%,rgba(12,18,14,.72) 55%,rgba(12,18,14,0) 100%);
  }
  .s-slider-section .s-slide-wrapper .s-text-wrapper .s-header{
    font-size:19px!important;line-height:1.2!important;margin:0 0 6px;color:#fff;
  }
  .s-slider-section .s-slide-wrapper .s-text-wrapper .s-description{
    margin:0;font-size:13px;line-height:1.4;color:rgba(255,255,255,.9);
    display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;
  }
  .s-slider-section .s-slide-wrapper .s-slide-cta{margin-top:12px!important;}
  .s-slider-section .s-slider-nav{display:none!important;}

  /* --- плашки преимуществ -------------------------------------------------- */
  /* section.info_blok — flex с четырьмя .blok по 107px: 423px не влезают в 343 */
  section.info_blok{
    display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));
    gap:8px;padding:0;margin:14px 0;
  }
  section.info_blok .blok{
    float:none!important;width:auto!important;margin:0!important;
    background:#fff;border-radius:var(--ad-radius);padding:14px 10px;
    box-shadow:var(--ad-shadow);text-align:center;
  }
  section.info_blok .blok .s-info-header{width:auto!important;}

  /* --- фильтры ------------------------------------------------------------
     Правило `.is-collapsed form{display:none}` отсюда убрано: заголовок
     панели лежит ВНУТРИ формы, поэтому на телефоне вместе с телом фильтра
     пропадала и сама полоса — фильтра на мобильной витрине не было видно
     вообще. Сворачиванием и стрелкой теперь занимается один хозяин —
     shop/themes/foxstore/css/agrodoyar.css вместе с инлайновым скриптом
     в category.filters.html. Здесь остаётся только раскладка под узкий экран. */
  .s-category-filters.is-top .s-filters-header{border-radius:10px 10px 0 0;}
  .s-category-filters.is-top .s-filters-hint{display:none;}
  .s-category-filters.is-top .s-filters-body{
    display:block;padding:14px 14px 4px;
  }
  .s-category-filters.is-top .s-filter-group{
    max-width:none;min-width:0;width:auto;padding:0 0 14px;
  }
  .s-category-filters.is-top .s-buttons-wrapper{padding:0 14px 16px;}
  .s-category-filters.is-top .s-buttons-wrapper .s-button{
    width:100%;margin:0 0 8px;
  }

  /* --- сортировка -------------------------------------------------------- */
  .s-products-wrapper .s-sorting-wrapper{
    display:flex;flex-wrap:wrap;gap:8px;align-items:center;padding:10px 0;
  }
  .s-products-wrapper .s-sorting-wrapper .s-sorting-list.view-filters{display:none;}

  /* --- подвал ------------------------------------------------------------ */
  .s-footer-wrapper .s-footer-block{padding:0 12px;}
  .s-footer-wrapper .s-footer-top .s-column,
  .s-footer-wrapper .s-footer-middle .s-column,
  .s-footer-wrapper .s-footer-bottom .s-column{
    display:block!important;width:auto!important;text-align:left!important;
    padding:8px 0;
  }
  .s-footer-wrapper{padding-bottom:calc(64px + var(--ad-safe-b));} /* место под таббар */

  /* --- нижний таббар ----------------------------------------------------- */
  .ad-tabbar{
    display:flex;position:fixed;left:0;right:0;bottom:0;z-index:900;
    background:#fff;border-top:1px solid var(--ad-line);
    padding-bottom:var(--ad-safe-b);
    box-shadow:0 -1px 8px rgba(16,24,32,.07);
  }
  .ad-tabbar a{
    flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;
    gap:3px;min-height:56px;color:var(--ad-muted);text-decoration:none;
    font-size:10.5px;line-height:1;position:relative;
    -webkit-tap-highlight-color:transparent;
  }
  .ad-tabbar a:active{background:#f2f4f5;}
  .ad-tabbar a.is-active{color:var(--ad-accent);}
  .ad-tabbar svg{width:21px;height:21px;stroke:currentColor;fill:none;
    stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;}
  .ad-tabbar .ad-icon-btn__count{top:6px;right:calc(50% - 20px);}

  /* Нижний рекламный баннер темы на телефоне только тянет трафик */
  .s-bottom-banner{display:none!important;}
}

/* ===========================================================================
   ТЕЛЕФОН
   =========================================================================== */
@media (max-width:599px){
  .s-products-wrapper .s-products-list.thumbs-view,
  .s-products-wrapper .s-products-list.is-short{gap:8px;}
  .s-products-list .s-product-wrapper .s-image-wrapper{
    height:118px!important;line-height:118px!important;
  }
  .s-global-header,h1.s-global-header{font-size:20px;}
  .s-product-page .s-product-photos .s-photo-main a{height:220px;line-height:220px;}
}

/* Совсем узкие экраны — одна колонка, иначе название не читается */
@media (max-width:359px){
  .s-products-wrapper .s-products-list.thumbs-view,
  .s-products-wrapper .s-products-list.is-short{grid-template-columns:1fr;}
}

/* Уважаем системную настройку «меньше движения» */
@media (prefers-reduced-motion:reduce){
  .ad-drawer,.ad-scrim,.ad-search-panel,.ad-expand svg{transition:none!important;}
}

/* ===========================================================================
   ПРАВКИ ПО ЗАМЕЧАНИЯМ — 07.09.2026
   =========================================================================== */

/* --- Скроллбар в фирменных цветах (весь сайт, не только мобильный) -------- */
* { scrollbar-width: thin; scrollbar-color: var(--ad-accent) #e9ecea; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #e9ecea; }
::-webkit-scrollbar-thumb {
  background: var(--ad-accent); border-radius: 8px;
  border: 2px solid #e9ecea;
}
::-webkit-scrollbar-thumb:hover { background: var(--ad-accent-dark); }
::-webkit-scrollbar-corner { background: #e9ecea; }

@media (max-width: 1023px) {

  /* --- 1. Футер: убрать белые линии ------------------------------------- */
  /* .s-footer-top отдаёт border-bottom белым, .s-phone-section — border-left */
  .s-footer-wrapper .s-footer-top,
  .s-footer-wrapper .s-footer-middle,
  .s-footer-wrapper .s-footer-bottom,
  .s-footer-wrapper .s-phone-section,
  .s-footer-wrapper .s-layout,
  .s-footer-wrapper .s-column { border: 0 !important; }

  /* --- 3. Шторка не должна залезать выше .s-main-block ------------------- */
  /* --ad-drawer-top выставляет js/mobile.js при открытии */
  .ad-drawer, .ad-scrim, .ad-search-panel { top: var(--ad-drawer-top, 0px) !important; }

  /* --- 2. Панель поиска: закрыть слева, лупа справа ---------------------- */
  .ad-search-panel form { gap: 6px; }
  .ad-search-panel .ad-search-panel__close {
    order: -1; flex: 0 0 40px; width: 40px !important; height: 44px !important;
    padding: 0 !important; border: 0 !important; background: none !important;
    display: inline-flex !important; align-items: center; justify-content: center;
    box-shadow: none !important;
  }
  .ad-search-panel .ad-search-panel__close svg {
    width: 22px !important; height: 22px !important;
    stroke: #20242a; fill: none; stroke-width: 2;
    stroke-linecap: round; stroke-linejoin: round;
  }
  .ad-search-panel .ad-search-panel__submit {
    flex: 0 0 44px; width: 44px !important; height: 44px !important;
    padding: 0 !important; border: 0 !important; border-radius: 10px;
    background: var(--ad-accent) !important; cursor: pointer;
    display: inline-flex !important; align-items: center; justify-content: center;
    box-shadow: none !important;
  }
  .ad-search-panel .ad-search-panel__submit svg {
    width: 21px !important; height: 21px !important;
    stroke: #fff; fill: none; stroke-width: 2;
    stroke-linecap: round; stroke-linejoin: round;
  }

  /* --- 4. Крестик — слева, на месте бургера ------------------------------ */
  .ad-drawer__head { padding: 6px 16px 6px 8px; }
  .ad-drawer__head .ad-icon-btn { order: -1; }          /* закрыть → влево */
  .ad-drawer__title { flex: 1; margin-left: 4px; }

  /* --- 5. Служебные ссылки в шторке — как разделы каталога --------------- */
  .ad-drawer .ad-drawer__links { padding: 0; background: #fff; }
  .ad-drawer .ad-drawer__links li { border-bottom: 1px solid var(--ad-line); }
  .ad-drawer .ad-drawer__links a {
    display: block; padding: 15px 16px; color: var(--ad-ink);
    font-size: 15px; line-height: 1.35; text-decoration: none;
  }
  .ad-drawer .ad-drawer__links a:active { background: #f2f4f5; }

  /* --- 7. Слайдер: акцент на товаре + стрелки по бокам ------------------- */
  /* промо 900×502, слайд узкий и высокий: при cover по центру в кадр
     попадала трава, а товар (он правее центра) срезался */
  .s-slider-section .s-slide-wrapper .s-image {
    background-size: cover !important;
    background-position: 65% center !important;
  }
  .s-slider-section .bx-viewport,
  .s-slider-section .s-slide-list,
  .s-slider-section .s-slide-wrapper { height: 320px !important; }

  /* Тема задаёт стрелкам 30×50, чёрный фон и left:0 — перекрываем целиком */
  .s-slider-section .bx-wrapper { position: relative; }
  .s-slider-section .bx-controls-direction { display: block !important; }
  .s-slider-section .bx-prev,
  .s-slider-section .bx-next {
    display: block !important;
    /* по центру слайда стрелки попадали на градиент текстового блока:
       круг просвечивал зелёным, а шеврон налезал на заголовок.
       Уводим их в зону фотографии, выше текста. */
    position: absolute !important; top: 96px !important; bottom: auto !important;
    width: 40px !important; height: 40px !important; margin: 0 !important;
    border-radius: 50% !important;
    background: #fff !important; background-image: none !important;
    box-shadow: 0 2px 10px rgba(16,24,32,.3) !important;
    text-indent: -9999px !important; overflow: hidden !important;
    border: 0 !important; z-index: 5 !important;
  }
  .s-slider-section .bx-prev { left: 10px !important; right: auto !important; }
  .s-slider-section .bx-next { right: 10px !important; left: auto !important; }
  /* Псевдоэлемент рисуем селектором той же длины, что у темы:
     custom.shop.css задаёт `.s-slider-section .bx-wrapper
     .bx-controls-direction a.bx-prev:after` — коробку 12×25 с SVG-стрелкой.
     Мои бордюры ложились поверх неё, и вместо шеврона выходила галочка. */
  .s-slider-section .bx-wrapper .bx-controls-direction a.bx-prev::after,
  .s-slider-section .bx-wrapper .bx-controls-direction a.bx-next::after,
  .s-slider-section .bx-prev::after,
  .s-slider-section .bx-next::after {
    content: "" !important; position: absolute !important; top: 50% !important;
    left: 50% !important; right: auto !important; bottom: auto !important;
    width: 9px !important; height: 9px !important;
    background: none !important; background-image: none !important;
    border: 0 !important;
    border-right: 2px solid #20242a !important;
    border-bottom: 2px solid #20242a !important;
    text-indent: 0 !important;
  }
  .s-slider-section .bx-wrapper .bx-controls-direction a.bx-prev::after,
  .s-slider-section .bx-prev::after {
    transform: rotate(135deg) !important; margin: -5px 0 0 -3px !important;
  }
  .s-slider-section .bx-wrapper .bx-controls-direction a.bx-next::after,
  .s-slider-section .bx-next::after {
    transform: rotate(-45deg) !important; margin: -5px 0 0 -6px !important;
  }

  /* текстовый блок не должен уходить под стрелки */
  .s-slider-section .s-slide-wrapper .s-text-wrapper { padding: 14px 54px 16px 16px; }
  .s-slider-section .s-slide-wrapper .s-text-wrapper .s-description {
    -webkit-line-clamp: 2;
  }

  /* --- 8. Плашки преимуществ на белом ----------------------------------- */
  section.info_blok { background-color: #fff; }

  /* --- 9. Плитка товара: цена слева, зачёркнутая справа ------------------ */
  .s-products-list .s-product-wrapper .s-price-wrapper {
    display: flex; align-items: baseline; gap: 8px; flex-wrap: nowrap;
  }
  .s-products-list .s-product-wrapper .s-price-wrapper .s-price {
    order: 1; font-size: 17px; font-weight: 700; color: var(--ad-ink);
  }
  .s-products-list .s-product-wrapper .s-price-wrapper .s-compare {
    order: 2; margin-left: auto; font-size: 12px;
    color: var(--ad-muted); text-decoration: line-through; white-space: nowrap;
  }
  /* «Купить» и галочка сравнения — на одной линии */
  .s-products-list .s-product-wrapper .s-buttons-wrapper .s-layout {
    display: flex !important; align-items: center; gap: 8px;
  }
  .s-products-list .s-product-wrapper .s-buttons-wrapper .s-column {
    display: block !important; width: auto !important; flex: 1 1 auto;
  }
  .s-products-list .s-product-wrapper .s-buttons-wrapper .s-column.right {
    flex: 0 0 auto; text-align: right;
  }
  .s-products-list .s-product-wrapper .s-buttons-wrapper .s-column form { margin: 0; }
  .s-products-list .s-product-wrapper .s-compare-button {
    display: inline-flex !important; align-items: center; justify-content: center;
    width: 38px; height: 38px; margin: 0; padding: 0; border-radius: 8px;
    background: #f2f4f5 !important; color: var(--ad-muted) !important;
  }
  .s-products-list .s-product-wrapper .s-compare-button.is-active {
    color: var(--ad-accent) !important;
  }

  /* --- 12. Хлебные крошки в две строки ----------------------------------- */
  /* -webkit-box здесь не годится: каждый <li> становится отдельной строкой
     и третья крошка обрезается. Нужен обычный перенос по словам. */
  .s-breadcrumbs-wrapper {
    display: block !important; white-space: normal !important;
    overflow: visible !important; line-height: 1.5; max-height: none;
  }
  .s-breadcrumbs-wrapper .s-item { display: inline; }

  /* --- 13. Заголовок карточки товара ------------------------------------- */
  .s-product-page .s-product-header .s-header {
    margin: 0; font-size: 22px; line-height: 30px; font-weight: 500;
  }

  /* --- 14. Обрезанный анонс в карточке не нужен -------------------------- */
  .s-product-page .s-summary { display: none !important; }

  /* --- 15. Блок наличия, цены и покупки ---------------------------------- */
  .s-product-page .info_blok {
    background: #fff; border: 1px solid var(--ad-line); border-radius: var(--ad-radius);
    padding: 12px 14px; margin-bottom: 12px;
  }
  .s-product-page .info_blok br { display: none; }
  .s-product-page .s-stocks-wrapper strong.stock-high,
  .s-product-page .s-stocks-wrapper strong {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 5px 12px; border-radius: 999px;
    background: rgba(46,125,50,.1); color: var(--ad-accent-dark);
    font-size: 13px; font-weight: 600;
  }
  .s-product-page .s-product-cart {
    background: #fff; border: 1px solid var(--ad-line);
    border-radius: var(--ad-radius); padding: 14px;
  }
  .s-product-page .s-product-cart br { display: none; }
  .s-product-page .s-product-cart .s-price-wrapper {
    display: flex !important; align-items: baseline; gap: 10px; margin-bottom: 12px;
  }
  .s-product-page .s-product-cart .s-price-wrapper .s-price {
    order: 1; font-size: 28px; font-weight: 700; color: var(--ad-ink); line-height: 1.1;
  }
  .s-product-page .s-product-cart .s-price-wrapper .s-compare-price {
    order: 2; font-size: 15px; color: var(--ad-muted);
    text-decoration: line-through; white-space: nowrap;
  }
  /* «Добавить в корзину» и «К сравнению» — одна под другой: в строку они
     ужимали главную кнопку до половины экрана ради второстепенного действия. */
  .s-product-page .s-cart-footer .s-layout {
    display: flex !important; flex-direction: column; align-items: stretch; gap: 10px;
  }
  .s-product-page .s-cart-footer .s-column { flex: 0 0 auto; text-align: left; }
  .s-product-page .s-cart-footer .s-submit-button {
    width: 100%; min-height: 50px; border-radius: 10px;
    font-size: 16px; font-weight: 600;
  }
  .s-product-page .s-cart-footer .s-compare-button {
    display: flex; align-items: center; justify-content: center;
    /* box-sizing у ссылки — content-box, поэтому width:100% плюс паддинг
       и рамка делали её на 30px шире колонки и она вылезала за край */
    box-sizing: border-box;
    width: 100%; height: 50px; padding: 0 14px;
    border: 1px solid var(--ad-line); border-radius: 10px;
    color: var(--ad-muted) !important; font-size: 13px; white-space: nowrap;
  }
  /* кнопки «поделиться» — мельче и по левому краю, это не главное действие */
  .s-product-page .ya-share2 { text-align: left !important; margin: 4px 0 12px !important; }
  .s-product-page .ya-share2 .ya-share2__item { margin-right: 4px !important; }

  /* --- 17. Шапка и лента блога ------------------------------------------- */
  .s-header-wrapper ul.pages {
    display: flex; gap: 8px; list-style: none; margin: 12px; padding: 0;
  }
  .s-header-wrapper ul.pages li a {
    display: block; padding: 9px 16px; border-radius: 999px;
    background: #fff; border: 1px solid var(--ad-line);
    color: var(--ad-ink); font-size: 14px; text-decoration: none;
  }
  .s-header-wrapper ul.pages li.selected a {
    background: var(--ad-accent); border-color: var(--ad-accent); color: #fff;
  }
  .s-header-wrapper form.search { display: block; margin: 0 12px 12px; }
  .s-header-wrapper form.search .search-wrapper {
    display: flex; align-items: center; gap: 8px;
    background: #fff; border: 1px solid var(--ad-line);
    border-radius: 10px; padding: 4px 4px 4px 14px;
  }
  .s-header-wrapper form.search input[type="search"] {
    flex: 1; min-width: 0; height: 40px; border: 0; background: none;
    font-size: 16px; color: var(--ad-ink); outline: none;
  }
  .s-header-wrapper form.search button {
    flex: 0 0 auto; width: 40px !important; height: 40px !important;
    padding: 0 !important; border: 0 !important; border-radius: 8px;
    background: var(--ad-accent) !important;
    display: inline-flex !important; align-items: center; justify-content: center;
  }
  .s-header-wrapper form.search button svg { width: 20px; height: 20px; fill: #fff; }

  /* --- 18. Дата записи была чёрной на тёмном ----------------------------- */
  .hint, .hint.date, .post .hint, .post .hint a { color: var(--ad-muted) !important; }

  /* --- 21. Карточка записи блога ----------------------------------------- */
  .post {
    margin-bottom: 20px; padding: 16px;
    background-color: #fff;
    box-shadow: 0 5px 30px rgba(0,0,0,.06);
    border-radius: var(--ad-radius);
  }
  .post h1, .post h2, .post h3 { margin-top: 0; }
  .post img { height: auto; border-radius: 8px; }
}

/* --- Двойной разделитель в хлебных крошках (виден и на десктопе) ----------
   breadcrumbs.layout.html печатает <span class="s-sep">›</span>, а в теме
   остался ещё и .s-item::before{content:">"} — получалось «>›».            */
.s-breadcrumbs-wrapper .s-item::before { content: none !important; }

@media (max-width: 1023px) {
  /* H1 карточки: у темы правило выигрывало, нужен !important */
  .s-product-page .s-product-header .s-header,
  .s-product-page h1.s-header {
    font-size: 22px !important; line-height: 30px !important;
    font-weight: 500 !important; margin: 0 !important; padding: 8px 0 !important;
  }

  /* Наличие, цена и покупка — одной карточкой, а не двумя вложенными */
  .s-product-page .s-pr > div {
    background: #fff; border: 1px solid var(--ad-line);
    border-radius: var(--ad-radius); padding: 14px; margin-top: 12px;
  }
  .s-product-page .info_blok,
  .s-product-page .s-product-cart {
    background: none !important; border: 0 !important;
    border-radius: 0 !important; padding: 0 !important; margin: 0 !important;
  }
  .s-product-page .info_blok { margin-bottom: 12px !important; }

  /* Цена была по центру: .s-cart-header{text-align:center;background:#f7f7f7},
     .s-price-wrapper{padding:0 34px} */
  .s-product-page .s-cart-header {
    text-align: left !important; background: none !important; padding: 0 !important;
  }
  .s-product-page .s-product-cart .s-price-wrapper {
    padding: 0 !important; justify-content: flex-start;
  }
}

@media (max-width: 1023px) {
  /* .s-cart-content держит только <meta> микроразметки и скрытый input,
     но тема красит его в #f7f7f7 — получался серый прямоугольник у цены.
     Не прячем через display:none, чтобы микроразметка осталась в потоке. */
  .s-product-page .s-cart-content {
    background: none !important; padding: 0 !important; margin: 0 !important;
    height: 0 !important; overflow: hidden !important; font-size: 0 !important;
  }
  .s-product-page .s-cart-footer {
    background: none !important; padding: 0 !important; margin-top: 14px !important;
  }
  .s-product-page .ya-share2 { margin: 0 0 14px !important; }
}

@media (max-width: 1023px) {
  /* Дата записи: тема даёт ей тёмный фон #2d2d2d и почти чёрный текст —
     на светлой карточке получался чёрный прямоугольник */
  .post .date, .post .hint, span.date, .credentials .date, .credentials .hint {
    background: none !important; color: var(--ad-muted) !important;
    padding-left: 0 !important; font-size: 13px !important;
  }
  .credentials { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
  .credentials .userpic { width: 22px; height: 22px; border-radius: 50%; }

  /* лупа в поиске блога рисуется инлайновым svg через currentColor */
  .s-header-wrapper form.search button { color: #fff !important; }
  .s-header-wrapper form.search button svg { fill: none !important; stroke: #fff; }
}

/* --- Блок подписки и обмена в блоге (все ширины) -------------------------- */
.ad-subscribe {
  background: #fff; border: 1px solid var(--ad-line, #e6e8eb);
  border-radius: 12px; padding: 14px; margin: 0 0 16px;
}
.ad-subscribe__title {
  display: block; margin-bottom: 10px;
  font-size: 12px; font-weight: 600; letter-spacing: .04em;
  text-transform: uppercase; color: #6b7280;
}
.ad-subscribe ul { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.ad-subscribe li { margin: 0; }
.ad-soc {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 13px; border-radius: 999px;
  background: #f2f4f5; color: #20242a !important;
  font-size: 13px; line-height: 1; text-decoration: none !important;
  transition: background .15s, color .15s;
}
/* тема прячет подписи внутри .subscribe — возвращаем */
.ad-subscribe .ad-soc span {
  display: inline !important; font-size: 13px !important;
  text-indent: 0 !important; width: auto !important; height: auto !important;
  overflow: visible !important; position: static !important; clip: auto !important;
}
.ad-soc svg {
  width: 16px; height: 16px; flex: 0 0 16px;
  fill: none; stroke: currentColor; stroke-width: 1.9;
  stroke-linecap: round; stroke-linejoin: round;
}
/* у ВК и Telegram знак заливкой, обводка их только пачкает */
.ad-soc--vk svg, .ad-soc--tg svg { fill: currentColor; stroke: none; }
.ad-soc:hover, .ad-soc:focus { color: #fff !important; }
.ad-soc--rss:hover { background: #f59e0b; }
.ad-soc--tg:hover  { background: #229ed9; }
.ad-soc--vk:hover  { background: #0077ff; }
.ad-soc--wa:hover  { background: #25d366; }

@media (max-width: 1023px) {
  .ad-subscribe { margin: 0 12px 16px; }
  /* зелёная полоска слева от даты — остаток тёмной темы блога */
  .post .date, .credentials .date { border-left: 0 !important; }
}

/* --- Иллюстрация в шапке записи блога (все ширины) ------------------------ */
.post-hero { margin: 0 0 20px; }
.post-hero img {
  display: block; width: 100%; height: auto;
  border-radius: 12px; background: #f2f4f5;
}
.post-hero figcaption {
  margin-top: 8px; font-size: 13px; line-height: 1.45; color: #6b7280;
}
.post h2 { margin: 26px 0 10px; font-size: 20px; line-height: 1.3; }
.post ul, .post ol { padding-left: 22px; }
.post li { margin-bottom: 6px; }

@media (max-width: 1023px) {
  .post-hero { margin: 0 0 16px; }
  .post-hero img { border-radius: 10px; }
  .post h2 { font-size: 18px; margin: 22px 0 8px; }
}

/* ===========================================================================
   ПРАВКИ ПО ЗАМЕЧАНИЯМ — 07.09.2026, вторая партия
   Здесь правила без медиазапроса: они нужны и на десктопе.
   =========================================================================== */

/* --- Уведомление о сравнении --------------------------------------------- */
.ad-toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 2000;
  transform: translate(-50%, 16px);
  display: flex; align-items: center; gap: 10px;
  max-width: calc(100vw - 32px);
  padding: 13px 18px; border-radius: 12px;
  background: #20242a; color: #fff;
  font-size: 14px; line-height: 1.35;
  box-shadow: 0 8px 30px rgba(16, 24, 32, .3);
  opacity: 0; pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
}
.ad-toast.is-open { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.ad-toast[hidden] { display: none !important; }
.ad-toast__icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; flex: 0 0 22px; border-radius: 50%;
  background: var(--ad-accent, #43A047); font-size: 13px; line-height: 1;
}
.ad-toast__text { flex: 1 1 auto; }
.ad-toast__link {
  flex: 0 0 auto; color: #8fd694 !important; text-decoration: underline;
  white-space: nowrap; font-weight: 600;
}
.ad-toast__link:hover { color: #fff !important; }
@media (max-width: 599px) {
  /* над нижним таббаром */
  .ad-toast { bottom: calc(70px + env(safe-area-inset-bottom, 0px)); font-size: 13px; }
}

/* --- Кнопка «Каталог»: бургер был серым на зелёном ------------------------ */
.s-header-wrapper .s-header-bottom .s-catalog-wrapper .s-catalog-button::before {
  background-color: transparent !important;
}

/* --- Выпадающий каталог: при наведении текст пропадал ---------------------
   custom.shop.css задаёт `ul.s-catalog-list .is-hover a:hover{color:#2d2d2d!important}`,
   а фон списка тоже #2d2d2d — раздел становился невидимым.                  */
.s-header-wrapper .s-header-bottom .s-catalog-wrapper .s-catalog-list > li > a:hover,
.s-header-wrapper .s-header-bottom .s-catalog-wrapper .s-catalog-list > li.is-hover > a:hover,
.s-header-wrapper .s-header-bottom .s-catalog-wrapper .s-catalog-list > li.is-opened > a,
ul.s-catalog-list .is-hover a:hover {
  color: #fff !important; text-decoration: underline !important;
}
.s-header-wrapper .s-header-bottom .s-catalog-wrapper .s-catalog-list .s-sub-item a:hover,
.s-header-wrapper .s-header-bottom .s-catalog-wrapper .s-catalog-list .s-sub-header:hover {
  color: var(--ad-accent, #43A047) !important; text-decoration: underline !important;
}

/* --- Цена: основная слева, зачёркнутая справа и мельче (десктоп тоже) ----- */
.s-products-wrapper .s-products-list .s-product-wrapper .s-price-wrapper {
  display: flex; align-items: baseline; gap: 10px; flex-wrap: nowrap;
}
.s-products-wrapper .s-products-list .s-product-wrapper .s-price-wrapper .s-price {
  order: 1; font-weight: 700;
}
.s-products-wrapper .s-products-list .s-product-wrapper .s-price-wrapper .s-compare {
  order: 2; margin-left: auto; font-size: 14px;
  color: #6b7280; text-decoration: line-through; white-space: nowrap;
}
.s-product-page .s-product-cart .s-price-wrapper {
  display: flex !important; align-items: baseline; gap: 12px;
  justify-content: flex-start; text-align: left;
}
.s-product-page .s-product-cart .s-price-wrapper .s-price { order: 1; }
.s-product-page .s-product-cart .s-price-wrapper .s-compare-price {
  order: 2; color: #6b7280; text-decoration: line-through; white-space: nowrap;
}
/* Размер задаём в пикселях и только для десктопа: em здесь наследуется от
   уже уменьшенного родителя и давал 7px. Мобильные размеры — в блоке выше. */
@media (min-width: 1024px) {
  .s-product-page .s-product-cart .s-price-wrapper .s-compare-price { font-size: 20px; }
}

/* --- Списки в блоге: маркеры-точки ---------------------------------------- */
.ad-subscribe ul, .ad-subscribe li,
ul.tree.timeline, ul.tree.timeline li, ul.tree.timeline ul {
  list-style: none !important; list-style-type: none !important;
}
.ad-subscribe li::marker, ul.tree.timeline li::marker { content: none; }

/* --- Архив записей -------------------------------------------------------- */
ul.tree.timeline {
  background: #fff; border: 1px solid var(--ad-line, #e6e8eb);
  border-radius: 12px; padding: 8px 0; margin: 0 0 16px;
}
ul.tree.timeline > li > a {
  display: block; padding: 10px 16px;
  font-weight: 600; font-size: 14px; color: #20242a !important;
  text-decoration: none !important;
}
ul.tree.timeline ul.tree { margin: 0; padding: 0 0 6px; }
ul.tree.timeline ul.tree > li > a {
  display: block; padding: 8px 16px 8px 30px;
  font-size: 13px; color: #6b7280 !important; text-decoration: none !important;
}
ul.tree.timeline a:hover { background: #f2f4f5; color: var(--ad-accent, #43A047) !important; }

/* --- Переключатель «Новости / Блог» и поиск по записям -------------------- */
ul.pages {
  display: flex; flex-wrap: wrap; gap: 8px;
  list-style: none !important; margin: 0 0 14px; padding: 0;
}
ul.pages li { margin: 0; list-style: none !important; }
/* фон с !important: тема красит ссылки в списке в акцентный цвет,
   и неактивная вкладка выглядела так же, как выбранная */
ul.pages li a {
  display: block; padding: 9px 18px; border-radius: 999px;
  background: #fff !important; border: 1px solid var(--ad-line, #e6e8eb);
  color: #20242a !important; font-size: 14px; text-decoration: none !important;
  transition: background .15s, border-color .15s, color .15s;
}
ul.pages li a:hover { border-color: var(--ad-accent, #43A047); color: var(--ad-accent, #43A047) !important; }
ul.pages li.selected a {
  background: var(--ad-accent, #43A047) !important;
  border-color: var(--ad-accent, #43A047);
  color: #fff !important;
}
form.search .search-wrapper {
  display: flex; align-items: center; gap: 8px;
  background: #fff; border: 1px solid var(--ad-line, #e6e8eb);
  border-radius: 10px; padding: 4px 4px 4px 14px;
  max-width: 460px;
}
form.search input[type="search"] {
  flex: 1; min-width: 0; height: 40px; border: 0; background: none;
  font-size: 15px; color: #20242a; outline: none;
}
form.search button {
  flex: 0 0 auto; width: 40px !important; height: 40px !important;
  padding: 0 !important; border: 0 !important; border-radius: 8px;
  background: var(--ad-accent, #43A047) !important; color: #fff !important;
  display: inline-flex !important; align-items: center; justify-content: center;
  cursor: pointer;
}
form.search button svg { width: 20px; height: 20px; fill: none !important; stroke: #fff; }

/* --- Дата записи: тёмный фон и почти чёрный текст из тёмной темы блога ---- */
.post .date, .post .hint, .credentials .date, .credentials .hint, span.hint.date {
  background: none !important; border-left: 0 !important;
  color: #6b7280 !important; padding-left: 0 !important;
}
.credentials { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.credentials .userpic { width: 22px; height: 22px; border-radius: 50%; }

@media (max-width: 1023px) {
  /* --- Подвал ------------------------------------------------------------ */
  /* .s-footer-middle держит пустой список соцсетей — на телефоне это просто
     лишний отступ */
  .s-footer-wrapper .s-footer-middle,
  .s-footer-wrapper .s-footer-bottom .s-column.right.middle { display: none !important; }

  .s-footer-wrapper { background: #23262b !important; }
  .s-footer-wrapper .s-footer-block { padding: 22px 16px 0 !important; }
  .s-footer-wrapper .s-footer-top { padding: 0 !important; }

  /* ссылки на страницы — двумя колонками, тап-таргет по высоте строки */
  /* .nav.navbar-nav в теме плавающие — колонка схлопывалась до 16px,
     и ссылки наезжали на блок с телефоном */
  .s-footer-wrapper .s-footer-top .s-column { float: none !important; overflow: hidden; }
  .s-footer-wrapper .s-footer-top .s-column ul.nav {
    display: grid !important; grid-template-columns: 1fr 1fr; gap: 2px 14px;
    float: none !important; width: auto !important;
    margin: 0 0 18px; padding: 0; list-style: none;
  }
  .s-footer-wrapper .s-footer-top .s-column ul.nav li { margin: 0; }
  .s-footer-wrapper .s-footer-top .s-column ul.nav li a {
    display: block; padding: 9px 0; font-size: 14px; line-height: 1.35;
    color: rgba(255,255,255,.78) !important; text-decoration: none !important;
  }
  .s-footer-wrapper .s-footer-top .s-column ul.nav li a:active,
  .s-footer-wrapper .s-footer-top .s-column ul.nav li a:hover {
    color: #fff !important;
  }
  /* блок «Новости / Блог» идёт вторым списком — отделяем линией */
  .s-footer-wrapper .s-footer-top .s-column #blog-links {
    border-top: 1px solid rgba(255,255,255,.1); padding-top: 6px;
  }

  /* телефон — главное действие в подвале */
  .s-footer-wrapper .s-footer-top .s-column.right { padding: 0 0 18px !important; }
  .s-footer-wrapper .s-phone-section { border: 0 !important; padding: 0 !important; }
  .s-footer-wrapper .s-phone-wrapper {
    display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
    padding: 14px 16px; border-radius: 12px;
    background: rgba(255,255,255,.06);
  }
  .s-footer-wrapper .s-phone-wrapper .s-phone {
    font-size: 20px; font-weight: 700; color: #fff !important; letter-spacing: .01em;
  }
  .s-footer-wrapper .s-phone-wrapper .s-tip {
    font-size: 12px; color: rgba(255,255,255,.6) !important;
  }
  .s-footer-wrapper .s-phone-wrapper .svg-icon { display: none; }

  /* реквизиты и подпись */
  .s-footer-wrapper .s-footer-bottom {
    border-top: 1px solid rgba(255,255,255,.1) !important;
    margin-top: 4px; padding: 14px 0 0 !important;
  }
  .s-footer-wrapper .s-footer-bottom .s-column {
    text-align: left !important; color: rgba(255,255,255,.5) !important;
    font-size: 12px !important; line-height: 1.5; padding: 0 0 14px !important;
  }
  .s-footer-wrapper .s-footer-bottom .s-copyright { display: block; margin-bottom: 6px; }
  .s-footer-wrapper .s-footer-bottom a { color: rgba(255,255,255,.5) !important; }
}

/* --- Локальный шрифт вместо Google Fonts ---------------------------------
   Тема тянула Fira Sans и Didact Gothic с fonts.googleapis.com: внешний
   блокирующий запрос, а для российского магазина ещё и спорно по 152-ФЗ.
   Montserrat лежит в репозитории, отдаём его со своего домена.            */
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 400;
  font-display: swap; src: url("fonts/Montserrat-400.ttf") format("truetype"); }
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 500;
  font-display: swap; src: url("fonts/Montserrat-500.ttf") format("truetype"); }
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 600;
  font-display: swap; src: url("fonts/Montserrat-600.ttf") format("truetype"); }
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 700;
  font-display: swap; src: url("fonts/Montserrat-700.ttf") format("truetype"); }

body, input, textarea, select, button, .s-button {
  font-family: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI",
               Roboto, "Helvetica Neue", Arial, sans-serif;
}

@media (max-width: 599px) {
  /* Montserrat шире прежнего шрифта темы: в двухколоночной плитке
     «38 000 ₽» и зачёркнутая цена перестали помещаться в строку
     и обрезались многоточием. Ужимаем и разрешаем перенос. */
  .s-products-wrapper .s-products-list .s-product-wrapper .s-price-wrapper {
    flex-wrap: wrap; gap: 2px 8px; min-width: 0;
  }
  .s-products-wrapper .s-products-list .s-product-wrapper .s-price-wrapper .s-price {
    font-size: 15px !important; white-space: nowrap;
  }
  .s-products-wrapper .s-products-list .s-product-wrapper .s-price-wrapper .s-compare {
    font-size: 12px !important; margin-left: 0 !important;
  }
}

/* --- H1 на главной ---------------------------------------------------------
   На главной выпадающий каталог в шапке раскрыт постоянно и позиционирован
   абсолютно: заголовок, идущий во всю ширину, уходил под него — читалось
   «…льное оборудование». Сдвигаем H1 в колонку контента: сайдбар 240px
   плюс отступ 16px (см. custom.css). На узких экранах сайдбара нет —
   правило только для десктопа.                                              */
@media (min-width: 1024px) {
  .s-global-header.s-home-header {
    padding-left: 256px;
    font-size: 26px;
    line-height: 1.25;
  }
}

/* --- Обратный звонок: кнопка в шапке и модальная форма ---------------------
   Цвета — фирменный #43A047 из темы. Модалка через position: fixed, чтобы
   не зависеть от прокрутки и от абсолютно позиционированного каталога.      */
.ad-callback-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  padding: 7px 14px;
  border: 1px solid #43A047;
  border-radius: 4px;
  background: transparent;
  /* тема красит любой <button> в белый через !important (my_style.html),
     перебить можно только тем же !important */
  color: #43A047 !important;
  font: inherit;
  font-size: 13px;
  line-height: 1.2;
  cursor: pointer;
  transition: background-color .15s, color .15s;
}
.ad-callback-btn:hover,
.ad-callback-btn:focus-visible {
  background: #43A047;
  color: #fff !important;
}

.ad-lead-scrim {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(17, 24, 20, .55);
}

.ad-lead-modal {
  position: fixed;
  z-index: 10001;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(420px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  box-sizing: border-box;
  padding: 24px 24px 20px;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 48px rgba(0, 0, 0, .28);
}
.ad-lead-modal__close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  padding: 6px;
  border: 0;
  background: none;
  cursor: pointer;
}
.ad-lead-modal__close svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: #6b7280;
  stroke-width: 2;
  stroke-linecap: round;
}
.ad-lead-modal__title {
  margin: 0 0 6px;
  font-size: 20px;
  line-height: 1.25;
  color: #1f2937;
}
.ad-lead-modal__note {
  margin: 0 0 16px;
  font-size: 13px;
  line-height: 1.45;
  color: #6b7280;
}

.ad-lead-field { display: block; margin-bottom: 12px; }
.ad-lead-field__label {
  display: block;
  margin-bottom: 4px;
  font-size: 13px;
  color: #374151;
}
.ad-lead-field__opt { color: #9ca3af; }
.ad-lead-field input,
.ad-lead-field textarea {
  box-sizing: border-box;
  width: 100%;
  padding: 9px 11px;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  font: inherit;
  font-size: 15px;
  color: #111827;
  background: #fff;
}
.ad-lead-field input:focus,
.ad-lead-field textarea:focus {
  outline: none;
  border-color: #43A047;
  box-shadow: 0 0 0 3px rgba(67, 160, 71, .15);
}
.ad-lead-field textarea { resize: vertical; }

/* honeypot: не display:none — часть ботов такие поля пропускает */
.ad-lead-fax {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.ad-lead-consent {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin: 4px 0 14px;
  font-size: 12px;
  line-height: 1.4;
  color: #6b7280;
}
.ad-lead-consent input { margin-top: 2px; }

.ad-lead-submit {
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: #43A047;
  color: #fff !important;
  font: inherit;
  font-size: 15px;
  cursor: pointer;
}
.ad-lead-submit:hover { background: #2E7D32; }

.ad-lead-status {
  min-height: 18px;
  margin-top: 10px;
  font-size: 13px;
  line-height: 1.4;
  color: #6b7280;
}
.ad-lead-status.is-error { color: #b91c1c; }
.ad-lead-status.is-success { color: #43A047; }

body.ad-lead-open { overflow: hidden; }

/* в мобильной шторке кнопка занимает всю ширину подвала */
.ad-drawer__foot .ad-callback-btn {
  display: flex;
  justify-content: center;
  width: 100%;
  margin-top: 12px;
  padding: 11px 14px;
  font-size: 14px;
}

/* ---------------------------------------------------------------------------
   Квиз-подбор оборудования (quiz.html + js/quiz.js).
   Модалка повторяет геометрию формы обратного звонка, но шире: варианты
   ответов в один столбец на узком экране расползались бы на два экрана.
   --------------------------------------------------------------------------- */
.ad-quiz-scrim {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(17, 24, 20, .55);
}
.ad-quiz-modal {
  position: fixed;
  z-index: 10001;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(520px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  box-sizing: border-box;
  padding: 24px 24px 20px;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 48px rgba(0, 0, 0, .28);
}
.ad-quiz-progress {
  height: 4px;
  margin: 0 0 16px;
  border-radius: 2px;
  background: #e5e7eb;
  overflow: hidden;
}
.ad-quiz-progress__bar {
  display: block;
  width: 0;
  height: 100%;
  background: #43A047;
  transition: width .25s ease;
}
.ad-quiz-question {
  margin: 0 0 6px;
  font-size: 16px;
  line-height: 1.35;
  font-weight: 600;
  color: #1f2937;
}
.ad-quiz-hint {
  margin: 0 0 14px;
  font-size: 13px;
  line-height: 1.45;
  color: #6b7280;
}
.ad-quiz-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 4px;
}
.ad-quiz-option {
  flex: 1 1 calc(50% - 8px);
  min-width: 140px;
  padding: 12px 14px;
  border: 1px solid #d1d5db !important;
  border-radius: 6px;
  background: #fff !important;
  color: #1f2937 !important;
  font: inherit;
  font-size: 14px;
  line-height: 1.3;
  text-align: left;
  cursor: pointer;
  transition: border-color .15s, background-color .15s;
}
.ad-quiz-option:hover,
.ad-quiz-option:focus-visible {
  border-color: #43A047 !important;
  background: #f2f8f2 !important;
}
.ad-quiz-option.is-picked {
  border-color: #43A047 !important;
  background: #43A047 !important;
  color: #fff !important;
}
.ad-quiz-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 14px;
}
.ad-quiz-back {
  padding: 6px 0;
  border: 0 !important;
  background: none !important;
  color: #6b7280 !important;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}
.ad-quiz-back:hover { color: #43A047 !important; }
/* Тема объявляет display у любой <button> с !important, поэтому атрибут
   hidden сам по себе кнопку «Назад» на первом шаге не прячет. */
.ad-quiz-back[hidden] { display: none !important; }
.ad-quiz-counter {
  font-size: 12px;
  color: #9ca3af;
}
@media (max-width: 520px) {
  .ad-quiz-option { flex-basis: 100%; }
}

/* ---------------------------------------------------------------------------
   Баннер раздела — первым блоком над списком товаров.
   --------------------------------------------------------------------------- */
.ad-cat-banner {
  position: relative;
  margin: 0 0 20px;
  border-radius: 8px;
  overflow: hidden;
}
.ad-cat-banner img {
  display: block;
  width: 100%;
  height: auto;
}
.ad-cat-banner__text {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 26px 28px 20px;
  background: linear-gradient(to top, rgba(20, 35, 22, .78), rgba(20, 35, 22, 0));
  color: #fff;
}
.ad-cat-banner__title {
  margin: 0 0 4px;
  font-size: 22px;
  line-height: 1.2;
  font-weight: 700;
  color: #fff;
}
.ad-cat-banner__note {
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
  color: rgba(255, 255, 255, .9);
}
@media (max-width: 760px) {
  .ad-cat-banner__text { padding: 14px 16px 12px; }
  .ad-cat-banner__title { font-size: 17px; }
  .ad-cat-banner__note { display: none; }
}
