/*
Theme Name: Woodmart Child
Description: Child theme for Woodmart
Author: AlexBes
Template: woodmart
Version: 1.0.0
Text Domain: woodmart-child
*/

/*
Theme Name: Woodmart Child
Description: Child theme for Woodmart
Author: AlexBes
Template: woodmart
Version: 1.0.0
Text Domain: woodmart-child
*/

/* ==========================================================================
   1. ОБЩИЙ КОНТЕЙНЕР ПЕРЕКЛЮЧАТЕЛЯ
   ========================================================================== */

.gtranslate_wrapper {
  position: relative;
  display: inline-block;
  z-index: 999;
}

/* Штатный виджет Google (нужен для GTranslate): прячем за экран */
.gtranslate_wrapper #google_translate_element2 {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ==========================================================================
   2. КНОПКА-ПЕРЕКЛЮЧАТЕЛЬ (Текущий флаг + стрелка)
   ========================================================================== */
.gt-dd-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 11px;
  cursor: pointer;
  color: #1f2937;

  /* Эффект матового стекла (Glassmorphism) */
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 14px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  backdrop-filter: blur(8px);

  /* Плавные переходы */
  transition: .25s;
}

/* Ховер-эффект кнопки */
.gt-dd-toggle:hover {
  border-color: rgba(99, 102, 241, 0.35);
  box-shadow: 0 6px 18px rgba(99, 102, 241, 0.22);
}


/* Иконка стрелочки */
.gt-chev {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Поворот стрелочки при открытом меню */
.gtranslate_wrapper.gt-open .gt-chev {
  transform: rotate(180deg);
}

/* ==========================================================================
   3. ВЫПАДАЮЩЕЕ МЕНЮ (Колонка флагов)
   ========================================================================== */
.gt-dd-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  z-index: 10;

  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 6px;
  overflow: hidden;

  /* Оформление меню */
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 16px;
  box-shadow: 0 18px 40px rgba(17, 24, 39, 0.18);
  backdrop-filter: blur(12px);

  /* Начальное скрытое состояние для анимации */
  transform-origin: top center;
  transform: translate(-50%, -10px) scale(0.94);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;

  transition: opacity 0.25s ease, transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), visibility 0s linear 0.35s;
}

/* Показ меню при активном классе gt-open */
.gtranslate_wrapper.gt-open .gt-dd-menu {
  transform: translate(-50%, 0) scale(1);
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity 0.25s ease, transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), visibility 0s;
}

/* ==========================================================================
   4. ССЫЛКИ С ФЛАГАМИ ВНУТРИ МЕНЮ
   ========================================================================== */
.gt-dd-menu a.glink {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;

  /* Сброс лишних стилей плагина */
  width: 42px !important;
  height: 42px;
  padding: 0 !important;
  border-radius: 12px;

  /* Двухбуквенный код языка */
  font-size: 14px !important;
  font-weight: 600;
  line-height: 1 !important;
  letter-spacing: .04em;
  color: #1f2937;
  text-decoration: none;

  /* Начальное скрытое состояние для каскадного появления */
  opacity: 0;
  transform: translateY(-6px) scale(0.8);
  transition: background 0.25s ease, transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
}

/* Каскадное появление элементов меню при открытии */
.gtranslate_wrapper.gt-open .gt-dd-menu a.glink {
  opacity: 1;
  transform: none;
  /* Использование переменной --i, задаваемой в JS, для задержки анимации каждого флага */
  transition-delay: 0s, calc(var(--i) * 60ms + 80ms), calc(var(--i) * 60ms + 80ms);
}

/* Сами флаги внутри пунктов меню */
.gt-dd-menu a.glink img {
  width: 26px;
  height: 26px;
  object-fit: cover;
  border-radius: 50%;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Ховер на пункт меню */
.gt-dd-menu a.glink:hover {
  background: linear-gradient(135deg, #eef2ff, #faf5ff);
  transition-delay: 0s;
}

/* Увеличение флага при наведении */
.gt-dd-menu a.glink:hover img {
  transform: scale(1.18);
}

/* Стили для активного (выбранного) языка */
.gt-dd-menu a.glink.is-active {
  background: #eef2ff;
}

/* Индикатор-точка для активного языка */
.gt-dd-menu a.glink.is-active::after {
  content: "";
  position: absolute;
  right: 4px;
  bottom: 4px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #6366f1;
  box-shadow: 0 0 0 2px #fff;
}

/* Двухбуквенные коды вместо флагов */
.gtranslate_wrapper .gt-code {
  display: inline !important;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.gtranslate_wrapper img {
  display: none !important;
}
.gt-dd-menu a.glink.is-active {
  color: #4f46e5;
}

/* ==========================================================================
   5. ДЛЯ ПОЛЬЗОВАТЕЛЕЙ С ОГРАНИЧЕНИЕМ ДВИЖЕНИЙ В ОС (Accessibility)
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  .gt-dd-menu,
  .gt-dd-menu a.glink,
  .gt-dd-menu a.glink img,
  .gt-dd-toggle,
  .gt-chev {
    transition: none !important;
  }
}

@media (max-width: 520px) {
  .whb-jbu6nk6s0o5wu2a59zbz .btn {
    font-size: 0;
  }
}

@media (min-width: 1025px) {
  #menu-katalog {
    display: grid !important;
    grid-template-rows: repeat(1, auto);
    grid-auto-flow: column;
    grid-auto-columns: max-content;
    column-gap: 30px;
    width: max-content;
    background-color: #fff;
    padding: 15px 0;
  }

  #menu-katalog > li {
    width: auto;
    max-width: 460px;
  }
}

.product-labels.labels-rounded .out-of-stock {
  max-width: none!important;
}

.product-labels {
  max-width: 100%!important;
}

/* ==========================================================================
   Кнопка WhatsApp + подсказка
   ========================================================================== */
.fb-consult {
  --fb-navy: #14264a;
  --fb-cream: #fdfdf9;
  --fb-white: #ffffff;
  --fb-size: 64px;
  --fb-gap: 20px;
  --fb-toolbar: 0px; /* высота липкого меню, ставится в custom.js */

  position: fixed;
  left: var(--fb-gap);
  bottom: calc(var(--fb-gap) + max(var(--fb-toolbar), env(safe-area-inset-bottom, 0px)));
  z-index: 99;
  width: var(--fb-size);
  height: var(--fb-size);
}

.fb-consult__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--fb-navy);
  color: var(--fb-white);
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(20, 38, 74, .35);
  transition: transform .25s ease, box-shadow .25s ease;
  animation: fb-consult-pulse 2.4s ease-out infinite;
  -webkit-tap-highlight-color: transparent;
}
.fb-consult__btn:hover,
.fb-consult__btn:focus-visible {
  color: var(--fb-white);
  cursor: pointer;
  transform: scale(1.08);
  box-shadow: 0 8px 22px rgba(20, 38, 74, .45);
  animation-play-state: paused;
}
.fb-consult__btn:focus-visible {
  outline: 3px solid var(--fb-cream);
  outline-offset: 3px;
}
.fb-consult__btn svg {
  display: block;
  flex: none;
}

@keyframes fb-consult-pulse {
  0%   { box-shadow: 0 6px 18px rgba(20, 38, 74, .35), 0 0 0 0 rgba(20, 38, 74, .45); }
  70%  { box-shadow: 0 6px 18px rgba(20, 38, 74, .35), 0 0 0 16px rgba(20, 38, 74, 0); }
  100% { box-shadow: 0 6px 18px rgba(20, 38, 74, .35), 0 0 0 0 rgba(20, 38, 74, 0); }
}

/* Подсказка справа от кнопки */
.fb-consult__tip {
  position: absolute;
  left: calc(100% + 14px);
  top: 50%;
  display: flex;
  align-items: center;
  gap: 6px;
  width: max-content;
  max-width: min(260px, calc(100vw - var(--fb-gap) - var(--fb-size) - 14px - 16px));
  padding: 10px 8px 10px 14px;
  border-radius: 16px;
  background: var(--fb-cream);
  color: var(--fb-navy);
  box-shadow: 0 6px 20px rgba(20, 38, 74, .18);
  border: 1px solid rgba(20, 38, 74, .12);

  opacity: 0;
  visibility: hidden;
  transform: translate(-10px, -50%);
  transition: opacity .45s ease, transform .45s ease, visibility 0s linear .45s;
}
.fb-consult__tip.fb-is-open {
  opacity: 1;
  visibility: visible;
  transform: translate(0, -50%);
  transition: opacity .45s ease, transform .45s ease, visibility 0s;
}
/* «хвостик» подсказки */
.fb-consult__tip::before {
  content: "";
  position: absolute;
  left: -6px;
  top: 50%;
  width: 10px;
  height: 10px;
  background: var(--fb-cream);
  border-left: 1px solid rgba(20, 38, 74, .12);
  border-bottom: 1px solid rgba(20, 38, 74, .12);
  transform: translateY(-50%) rotate(45deg);
}

.fb-consult__tiptext {
  font-size: 14px;
  line-height: 1.3;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
  color: var(--fb-navy);
  text-decoration: none;
}
.fb-consult__tiptext:hover {
  color: var(--fb-navy);
  text-decoration: underline;
}

/* Крестик */
.fb-consult__close {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  box-shadow: none;
  color: var(--fb-navy);
  cursor: pointer;
  transition: background-color .2s ease;
}
.fb-consult__close:hover,
.fb-consult__close:focus-visible {
  background: rgba(20, 38, 74, .1);
  color: var(--fb-navy);
}

/* Планшет/мобильный: снизу липкое меню Woodmart */
@media (max-width: 1024px) {
  .fb-consult {
    --fb-size: 58px;
    --fb-gap: 14px;
    --fb-toolbar: 56px; /* запасное значение, если JS не отработал */
  }
  .fb-consult__btn svg { width: 28px; height: 28px; }
  .fb-consult__tiptext { font-size: 13px; }
}

@media (prefers-reduced-motion: reduce) {
  .fb-consult__btn { animation: none; transition: none; }
  .fb-consult__tip,
  .fb-consult__tip.fb-is-open { transition: none; }
}

@media print {
  .fb-consult { display: none; }
}

/* hero custom style */
.swiper-slide-inner .swiper-slide-contents {
  position: relative;
  background-color: transparent !important;
  backdrop-filter: none !important;
  -webkit-mask-image: none !important;
  mask-composite: auto !important;
  will-change: transform, opacity;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}

.swiper-slide-inner .swiper-slide-contents::before {
  content: "";
  position: absolute;
  top: -20px;
  left: -20px;
  right: -20px;
  bottom: -20px;
  background-color: rgba(255, 255, 255, 0.4);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  -webkit-mask-image:
      linear-gradient(to bottom, transparent, white 60px),
      linear-gradient(to top, transparent, white 60px),
      linear-gradient(to right, transparent, white 60px),
      linear-gradient(to left, transparent, white 60px);
  -webkit-mask-composite: source-in;
  mask-composite: intersect;
  opacity: 0;
  animation: heroBlurIn 0.6s ease-out 0.5s forwards;
}

@media (max-width: 767px) {
  .swiper-slide-inner .swiper-slide-contents::before {
    background-color: rgba(255, 255, 255, 0.8);
    top: -60px;
    left: -60px;
    right: -60px;
    bottom: -60px;
  }
}

@keyframes heroBlurIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.swiper-slide-inner .elementor-slide-heading,
.swiper-slide-inner .elementor-slide-description,
.swiper-slide-inner .elementor-button {
  position: relative;
}

.elementor-element-c3ad986 .swiper-slide-inner {
  max-width: 1280px;
  padding-left: 45px!important;
  padding-right: 45px!important;
}

/* footer-catalog */
:root {
  --fc-duration: 0.35s;
}

.footer-catalog-item {
  position: relative;
  cursor: pointer;
  padding-right: 24px;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.footer-catalog-item::after {
  content: "";
  position: absolute;
  right: 4px;
  top: 50%;
  width: 7px;
  height: 7px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-70%) rotate(45deg);
  transition: transform var(--fc-duration, 0.35s) ease;
}

.footer-catalog-item.is-open::after {
  transform: translateY(-30%) rotate(-135deg);
}

/* Подпункт: закрыт */
.footer-catalog-subitem {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  visibility: hidden;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  margin-bottom: 0 !important;
  padding-left: 14px; /* отступ слева */
  transition:
      max-height var(--fc-duration, 0.35s) ease,
      margin-top var(--fc-duration, 0.35s) ease,
      opacity var(--fc-duration, 0.35s) ease,
      visibility 0s linear var(--fc-duration, 0.35s);
  flex-shrink: 0;
  min-height: 0;
}

/* Подпункт: открыт */
.footer-catalog-subitem.is-open {
  max-height: 300px; /* запас с избытком, подпункт займёт ровно свою высоту */
  opacity: 1;
  visibility: visible;
  transition:
      max-height var(--fc-duration, 0.35s) ease,
      margin-top var(--fc-duration, 0.35s) ease,
      opacity var(--fc-duration, 0.35s) ease,
      visibility 0s;
}

.footer-catalog-subitem a {
  display: inline-block;
  padding: 5px 0;
}

.footer-catalog-item:focus-visible {
  outline: 1px dashed currentColor;
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .footer-catalog-item::after,
  .footer-catalog-subitem {
    transition: none;
  }
}
/* end footer-catalog */

.wd-header-cats.wd-style-1 .menu-opener {
  min-width: auto;
}


@media (min-width: 1024px) and (max-width: 1120px) {
  .whb-r5xp3lch97ldq0i283sl .menu-opener {
    min-width: 160px!important;
  }
  #menu-heder-desktop-menyu font {
    font-size: 13px!important;
  }
}

.wd-term-desc img {
  margin-bottom: 15px;
}

.wpforms-submit {
  border-radius: 35px!important;
  background-color: rgb(10,35,66)!important;
  text-transform: uppercase!important;
  font-size: 15px!important;
  font-family: inherit!important;
}

body.home .site-content {
  margin-bottom: 0;
}

.custom-phone-field .iti { display: block; width: 100%; }
.custom-phone-field .iti__country-container { display: none !important; }
.custom-phone-field .iti input,
.custom-phone-field .iti input[type="tel"] {
  padding-left: 12px !important; /* подберите под остальные поля формы */
  text-indent: 0 !important;
  width: 100%;
}


/* ============ ОБЩЕЕ ============ */
.wd-header-cats .menu > li > a .fb-desc,
.wd-nav-mobile > li > a .fb-desc {
  display: block;
  margin-top: 4px;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.3;
  text-transform: none;
  color: #6b7280;
}

/* =============== ДЕСКТОП =============== */
@media (min-width: 1025px) {

  .fb-mobile-only { display: none !important; }

  /* панель */
  .wd-dropdown-cats {
    --wd-dropdown-width: 1160px;
    width: 900px !important;
    max-width: calc(100vw - 40px);
    padding: 30px 15px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08) !important;
  }

  /* 3 колонки */
  .wd-dropdown-cats > .menu {
    display: grid;
    grid-template-columns: .8fr .8fr .8fr;
    align-items: start;
  }
  .wd-dropdown-cats > .menu > li {
    position: static;
    padding: 0;
    border: 0 !important;
  }
  .wd-dropdown-cats > .menu > li.fb-skin,
  .wd-dropdown-cats > .menu > li.fb-brands {
    border-left: 1px dashed #dfe3ea !important;
  }
  .wd-dropdown-cats .drop-category { display: none; }

  /* заголовок колонки */
  .wd-dropdown-cats > .menu > li > a {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 0 0 10px;
    margin: 0 0 10px;
    border-bottom: 1px solid #e3e6ec;
    background: none !important;
    pointer-events: none;            /* заголовок некликабельный */
    cursor: default;
  }
  .wd-dropdown-cats > .menu > li > a .nav-link-text {
    flex: 1 1 0;
    min-width: 0;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.25;
    text-transform: uppercase;
    color: #12244a;
  }
  .wd-dropdown-cats > .menu > li > a .nav-link-text::after {
    display: block;
    margin-top: 6px;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.35;
    text-transform: none;
    color: #6b7280;
  }

  /* подменю всегда раскрыто и лежит внутри колонки */
  .wd-dropdown-cats > .menu > li > .wd-dropdown-menu {
    position: static !important;
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    width: auto !important;
    min-width: 0 !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    box-shadow: none !important;
    background: none !important;
  }
  .wd-dropdown-cats > .menu > li > .wd-dropdown-menu::before,
  .wd-dropdown-cats > .menu > li > .wd-dropdown-menu::after { display: none; }
  .wd-dropdown-cats > .menu > li > .wd-dropdown-menu > .container {
    width: auto;
    max-width: none;
    padding: 0;
  }

  /* списки ссылок */
  .wd-dropdown-cats .wd-sub-menu {
    margin: 0;
    padding: 0;
    list-style: none;
  }
  .fb-catalog .wd-sub-menu,
  .fb-skin .wd-sub-menu {
    display: grid;
    grid-auto-flow: column;
    grid-template-rows: repeat(5, auto);
    grid-template-columns: repeat(2, 1fr);
    column-gap: 36px;
  }

  .wd-dropdown-cats .wd-sub-menu > li > a {
    display: flex;
    align-items: center;
    padding: 3px 0;
    font-size: 15px;
    font-weight: 400;
    text-transform: none;
    color: #374151;
  }
  .wd-dropdown-cats .wd-sub-menu > li > a:hover { color: #12244a; }

  /* стрелка справа (как на макете: у каталога и брендов) */
  .fb-catalog .wd-sub-menu > li > a::after,
  .fb-brands .wd-sub-menu > li > a::after {
    content: "";
    flex: none;
    width: 7px;
    height: 7px;
    margin-left: 12px;
    border: solid #b7bcc7;
    border-width: 1.5px 1.5px 0 0;
    transform: rotate(45deg);
  }
}

/* =============== МОБИЛЬНЫЙ =============== */
@media (max-width: 1024px) {

  .wd-nav-mobile > li:is(.fb-catalog, .fb-skin, .fb-brands, .fb-pro, .fb-extra) > a {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 56px 14px 16px;
    text-transform: none;
  }
  .wd-nav-mobile > li:is(.fb-catalog, .fb-skin, .fb-brands, .fb-pro) > a::before {
    flex-basis: 48px;
    width: 48px;
    height: 48px;
  }
  .wd-nav-mobile > li:is(.fb-catalog, .fb-skin, .fb-brands, .fb-pro) > a .nav-link-text {
    flex: 1 1 0;
    min-width: 0;
    font-size: 16px;
    font-weight: 600;
    text-transform: none;
    color: #12244a;
  }
  /* короткое описание в одну строку */
  .wd-nav-mobile > li:is(.fb-catalog, .fb-skin, .fb-brands, .fb-pro) > a .nav-link-text::after {
    display: block;
    margin-top: 3px;
    font-size: 12.5px;
    font-weight: 400;
    color: #6b7280;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* Доставка / Контакты / Обратная связь */
  .wd-nav-mobile > li.fb-extra > a .nav-link-text {
    font-size: 15px;
    font-weight: 500;
    text-transform: none;
  }
}


@media (min-width: 1025px) {
  .menu.wd-nav ul.wd-sub-menu {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px; /* Отступ между колонками и строками (при необходимости измените) */
  }
  .menu.wd-nav > li:nth-child(3) ul.wd-sub-menu {
    grid-template-columns: auto;
  }

  #menu-katalog.wd-nav-vertical>li.menu-item-has-children>a:after {
    content: none;
  }

  #menu-katalog {
    column-rule: 1px solid var(--brdcolor-gray-300);
  }
}

.wd-nav-vertical.wd-design-default {
  border: none!important;
}

/* цвета подложки под иконкой */
.fb-catalog { --fb-bg: #e8f0fb; }
.fb-skin    { --fb-bg: #e4f5ea; }
.fb-brands  { --fb-bg: #ece9fb; }
.fb-pro     { --fb-bg: #e8f0fb; }

/* иконка пункта верхнего уровня */
:is(.wd-dropdown-cats > .menu, .wd-nav-mobile) > li > a > .wd-nav-img {
  flex: 0 0 auto;
  width: 50px !important;
  height: 50px !important;
  max-width: none;
  max-height: none;
  margin: 0 !important;
  padding: 5px;
  box-sizing: border-box;
  object-fit: contain;
  border-radius: 14px;
  background: var(--fb-bg, #e8f0fb);
}

/* логотипы внутри списка брендов не нужны */
.fb-brands ul .wd-nav-img { display: none !important; }

@media (max-width: 1024px) {
  :is(.wd-nav-mobile) > li:is(.fb-catalog, .fb-skin, .fb-brands, .fb-pro) > a > .wd-nav-img {
    width: 48px !important;
    height: 48px !important;
    padding: 12px;
  }

  /* Доставка / Контакты / Обратная связь: маленькая иконка без подложки */
  .wd-nav-mobile > li.fb-extra > a > .wd-nav-img {
    border-radius: 0;
    background: none;
  }
  .wd-nav-mobile>li>a, .wd-nav-mobile>li>ul li>a {
    padding: 15px 20px!important;
  }

  :is(.wd-dropdown-cats > .menu, .wd-nav-mobile) > li > a > .wd-nav-img {
    margin-right: 10px!important;
  }
}


@media (min-width: 1025px) {

  /* сетка: 3 колонки, 2 общие строки (заголовок / список) */
  .wd-dropdown-cats > #menu-katalog {
    display: grid !important;
    grid-auto-flow: row !important;
    grid-auto-columns: auto !important;
    grid-template-columns: .7fr .7fr .56fr !important;
    grid-template-rows: auto 1fr !important;
    column-gap: 0 !important;
    column-rule: none !important;
    /*width: 100% !important;*/
    padding: 0 !important;
    border: 0 !important;
    background: none !important;
    align-items: stretch;
  }

  /* каждый li занимает обе строки и наследует их через subgrid */
  .wd-dropdown-cats > #menu-katalog > li {
    display: grid !important;
    grid-row: 1 / span 2;
    grid-template-rows: subgrid;
    row-gap: 0;
    min-width: 0;
    padding: 0 15px;
  }
  .wd-dropdown-cats > #menu-katalog > li:first-child {
    padding-left: 0;
  }
  .wd-dropdown-cats > #menu-katalog > li + li {
    border-left: 1px dashed #dfe3ea !important;
  }

  /* строка 1: заголовок (одинаковой высоты у всех) */
  .wd-dropdown-cats > #menu-katalog > li > a.woodmart-nav-link {
    grid-row: 1;
    align-self: stretch;
    align-items: flex-start;
    margin-bottom: 18px;
  }

  /* строка 2: список ссылок */
  .wd-dropdown-cats > #menu-katalog > li > .wd-dropdown-menu {
    grid-row: 2;
    align-self: start;
  }

  /* в колонки попадают только первые три пункта */
  .wd-dropdown-cats > #menu-katalog > li:nth-child(n+4) {
    display: none !important;
  }
}

/* запасной вариант для браузеров без subgrid */
@supports not (grid-template-rows: subgrid) {
  @media (min-width: 1025px) {
    .wd-dropdown-cats > #menu-katalog > li > a.woodmart-nav-link {
      min-height: 130px;
    }
  }
}
/* ==========================================================================
   Мобильный выпадающий фильтр магазина (≤1024px)
   JS: блок «mobile-filters» в js/custom.js
   ========================================================================== */
.fb-filters-trigger,
.fb-filters-chips,
.fb-filters-actions { display: none; }

@media (max-width: 1024px) {

  :root {
    --fb-fl-navy: #0a2342;
    --fb-fl-accent: #2f6fe4;
    --fb-fl-line: #e3e6ec;
    --fb-fl-top: 140px;      /* ставится в JS */
    --fb-fl-max: 60vh;       /* ставится в JS */
  }

  .wd-widget-collapse.wd-opened .widget-title:after {
    transform: rotate(45deg);
  }

  .fb-filters-trigger {
    margin-bottom: 40px!important;
  }

  .fb-filters-chips {
    display: none!important;
  }

  .fb-filters-trigger[hidden],
  .fb-filters-chips[hidden],
  .fb-filters-badge[hidden] { display: none !important; }

  /* ---------- кнопка «Фильтры» ---------- */
  .fb-filters-trigger {
    display: flex;
    align-items: center;
    gap: 12px;
    box-sizing: border-box;
    width: calc(100% - 30px);
    min-height: 0;
    height: 54px;
    margin: 12px 15px;
    padding: 0 18px;
    border: 1px solid #dcdfe5;
    border-radius: 14px;
    background: #f7f7f8;
    box-shadow: none;
    color: var(--fb-fl-navy);
    font-size: 20px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0;
    text-transform: none;
    text-align: left;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: border-color .2s ease, background-color .2s ease, box-shadow .2s ease;
  }
  .fb-filters-trigger .fb-ico { width: 26px; height: 26px; flex: none; }
  .fb-filters-trigger .fb-chev { width: 22px; height: 22px; flex: none; transition: transform .25s ease; }
  .fb-filters-trigger__text { flex: 1 1 auto; }
  .fb-filters-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    padding: 0 7px;
    border-radius: 12px;
    background: var(--fb-fl-navy);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
  }
  .fb-filters-trigger[aria-expanded="true"] {
    border-color: #4f8df5;
    background: #eef4ff;
    box-shadow: 0 0 0 2px rgba(79, 141, 245, .18);
  }
  .fb-filters-trigger[aria-expanded="true"] .fb-chev { transform: rotate(180deg); }

  /* ---------- активные фильтры (чипсы) ---------- */
  .fb-filters-chips {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 4px;
    margin: 0 0 10px;
    padding: 4px 15px;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .fb-filters-chips::-webkit-scrollbar { display: none; }
  .fb-chip {
    display: inline-flex;
    align-items: center;
    flex: none;
    gap: 7px;
    padding: 6px 8px;
    color: var(--fb-fl-navy);
    font-size: 16px;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
    white-space: nowrap;
  }
  .fb-chip .fb-x { width: 14px; height: 14px; flex: none; }
  .fb-chip--clear {
    margin-right: 6px;
    padding-right: 14px;
    border-right: 1px solid #dfe3ea;
  }

  html.fb-filters-open,
  html.fb-filters-open body { overflow: hidden !important; }

  /* ---------- сама панель (штатный сайдбар WoodMart) ---------- */
  .sidebar-container.fb-filters-panel {
    --wd-primary-color: var(--fb-fl-accent);
    position: fixed !important;
    top: var(--fb-fl-top) !important;
    left: 12px !important;
    right: 12px !important;
    bottom: auto !important;
    width: auto !important;
    max-width: none !important;
    height: auto !important;
    max-height: var(--fb-fl-max) !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 18px 40px rgba(17, 24, 39, .22);
    z-index: 100 !important;
    transform: translateY(-8px) !important;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .25s ease, transform .25s ease, visibility 0s linear .25s;
  }
  html.fb-filters-open .sidebar-container.fb-filters-panel {
    transform: none !important;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition: opacity .25s ease, transform .25s ease, visibility 0s;
  }

  /* штатная кнопка «Фильтры» над списком товаров не нужна */
  .wd-filter-buttons { display: none !important; }

  .fb-filters-panel .wd-heading,
  .fb-filters-panel .close-side-widget,
  .fb-filters-panel .widget_layered_nav_filters { display: none !important; }

  .fb-filters-panel .widget-area,
  .fb-filters-panel .wd-scroll-content,
  .fb-filters-panel .wd-scroll {
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
  }
  .fb-filters-panel .widget-area { padding: 4px 18px 0 !important; }

  /* ---------- разделы ---------- */
  .fb-filters-panel .widget {
    margin: 0 !important;
    padding: 0 !important;
    border: 0;
    border-bottom: 1px solid var(--fb-fl-line);
  }
  .fb-filters-panel .widget:last-child { border-bottom: 0; }

  .fb-filters-panel .widget-title {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    margin: 0 !important;
    padding: 16px 0 !important;
    color: var(--fb-fl-navy);
    font-size: 19px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0;
    text-transform: uppercase;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }
  .fb-filters-panel .widget-title::before { display: none !important; }
  .fb-filters-panel .widget-title::after {
    content: "" !important;
    display: block !important;
    position: static !important;
    inset: auto !important;
    float: none !important;
    flex: 0 0 auto;
    box-sizing: border-box !important;
    width: 9px !important;
    height: 9px !important;
    min-width: 9px !important;
    min-height: 9px !important;
    margin: -4px 4px 0 12px !important;
    padding: 0 !important;
    border: 0 solid currentColor !important;
    border-width: 0 2px 2px 0 !important;
    border-radius: 0 !important;     /* WoodMart скругляет псевдоэлементы: из-за этого стрелка была «полукруглой» */
    background: none !important;
    box-shadow: none !important;
    font-size: 0 !important;
    line-height: 0 !important;
    opacity: .6;
    transform: rotate(45deg);
    transition: transform .25s ease;
  }
  .fb-filters-panel .widget.fb-open > .widget-title::after {
    margin-top: 4px !important;
    transform: rotate(-135deg);
  }

  .fb-filters-panel .widget.fb-acc:not(.fb-open) > :not(.widget-title) { display: none !important; }
  .fb-filters-panel .widget.fb-acc.fb-open > :not(.widget-title) { display: block !important; }
  .fb-filters-panel .widget.fb-open > :not(.widget-title) { padding-bottom: 12px; }

  /* ---------- значения фильтра ---------- */
  .fb-filters-panel .widget ul {
    margin: 0 !important;
    padding: 0 !important;
    list-style: none;
  }
  .fb-filters-panel .widget li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0 !important;
    padding: 7px 0 !important;
    border: 0;
  }
  .fb-filters-panel .widget li > a {
    flex: 1 1 auto;
    min-width: 0;
    padding: 0 !important;
    color: var(--fb-fl-navy);
    font-size: 18px;
    line-height: 1.3;
  }
  .fb-filters-panel .widget li .count,
  .fb-filters-panel .wd-filter-list .count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    flex: none;
    height: 30px;
    min-width: 44px;
    margin: 0 !important;
    padding: 0 11px;
    border-radius: 999px;
    background: var(--fb-fl-navy);
    color: #fff !important;
    font-size: 15px;
    font-weight: 600;
    line-height: 1;
    text-align: center;
  }

  /* ---------- кнопки внизу панели ---------- */
  .fb-filters-panel .fb-filters-actions {
    display: flex;
    position: sticky;
    bottom: 0;
    z-index: 2;
    gap: 12px;
    padding: 14px 18px 16px;
    background: #fff;
  }
  .fb-filters-actions button {
    flex: 1 1 0;
    min-height: 0;
    height: 52px;
    margin: 0;
    padding: 0 12px;
    border-radius: 999px;
    box-shadow: none;
    font-size: 18px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0;
    text-transform: none;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }
  .fb-filters-actions .fb-btn-reset {
    border: 1.5px solid var(--fb-fl-navy);
    background: #fff;
    color: var(--fb-fl-navy);
  }
  .fb-filters-actions .fb-btn-apply {
    border: 1.5px solid var(--fb-fl-navy);
    background: var(--fb-fl-navy);
    color: #fff;
  }
}

@media (prefers-reduced-motion: reduce) {
  .fb-filters-trigger,
  .fb-filters-trigger .fb-chev,
  .sidebar-container.fb-filters-panel,
  .fb-filters-panel .widget-title::after { transition: none !important; }
}