

/* Start:/local/templates/main/css/home-mobile.css?179045821617378*/
/*
 * Mobile homepage ≤768 — вариант A «магазин сначала».
 * Подключение: index.php SetAdditionalCSS + поздний <link> в header.php
 * (после style.css; ShowHead выше — иначе каскад проигрывает).
 * ≥769 не затрагивает: все правила внутри max-width: 768px.
 */

@media screen and (max-width: 768px) {

  /* ------------------------------------------------------------------ */
  /* Порядок секций: screen-mob → contents, чтобы дети участвовали в flex */
  /* ------------------------------------------------------------------ */
  main.main {
    display: flex;
    flex-direction: column;
  }
  main.main > .screen-mob {
    display: contents;
  }
  /* дефолт для всего, что не перечислено */
  main.main > section,
  main.main > .screen-mob > section {
    order: 50;
  }
  main.main > section.intro {
    order: 1;
  }
  main.main > .screen-mob > section.section-list {
    order: 2;
  }
  main.main > section.catalog-list.catalog-main {
    order: 3;
  }
  main.main > section.video-section {
    order: 4;
  }
  main.main > section.pop-brands-section {
    order: 5;
  }
  main.main > section.discount-section {
    order: 6;
  }
  main.main > section.main-engage {
    order: 7;
  }
  main.main > section.salon-section {
    order: 8;
  }
  /* benefits-mob: после салонов, перед блогом; un-hide vs style.css ≤991 */
  main.main > .screen-mob > section.benefits-mob {
    order: 9;
    display: block !important;
  }
  main.main > section.blog-list.blog-main {
    order: 10;
  }
  /* Популярные категории и десктоп-benefits на мобилке не нужны */
  main.main > section.pop-section {
    display: none !important;
  }
  main.main > section.benefits {
    display: none !important;
  }

  /* ------------------------------------------------------------------ */
  /* Ритм отступов между секциями                                       */
  /* ------------------------------------------------------------------ */
  main.main > section,
  main.main > .screen-mob > section {
    padding-top: 28px;
    padding-bottom: 28px;
    margin: 0;
  }
  main.main > section.intro {
    padding-top: 0;
    padding-bottom: 16px;
  }

  /* ------------------------------------------------------------------ */
  /* Каталог: крупные плитки 2 колонки, без стены подкатегорий          */
  /* ------------------------------------------------------------------ */
  .section-list .section-top {
    margin-bottom: 12px;
  }
  .section-list .section-header h2 {
    margin-bottom: 0;
  }
  .section-list .sections-list .grid {
    display: grid !important;
    column-count: unset !important;
    -moz-column-count: unset !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .section-list .sections-list .grid .item {
    display: block;
    width: 100%;
    margin: 0;
    overflow: hidden;
  }
  .section-list .sections-list .item .section-menu,
  .section-list .sections-list .item .all {
    display: none !important;
  }
  .section-list .sections-list .item .name {
    border-bottom: none;
    padding: 12px 12px 14px;
    font-size: 15px;
    line-height: 120%;
  }
  .section-list .sections-list .item .name img {
    margin-bottom: 10px;
    width: 100%;
    height: auto;
    border-radius: 6px;
  }

  /* ------------------------------------------------------------------ */
  /* Хиты/новинки: карточка ~64% (было 85%, −25%)                       */
  /* ------------------------------------------------------------------ */
  .catalog-list.catalog-main .popular-items .item {
    flex-basis: 64% !important;
    width: 64% !important;
    min-width: 64% !important;
    max-width: 64% !important;
  }
  .catalog-list.catalog-main .nav-tabs {
    margin-bottom: 12px;
  }

  /* ------------------------------------------------------------------ */
  /* Бренды: ОДИН scroll-x ряд + peek; плитки ~2:1 (гориз. прямоуг.)    */
  /* ~2.25 видимых → крупнее; лого больше внутри; ≤10                   */
  /* ------------------------------------------------------------------ */
  .pop-brands-section .h2 {
    margin-bottom: 12px;
  }
  .pop-brands-section .sections-list .flex {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    gap: 10px;
    align-items: stretch;
    align-content: flex-start;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    padding-bottom: 4px;
    height: auto;
    min-height: 0;
  }
  .pop-brands-section .sections-list .flex::-webkit-scrollbar {
    display: none;
  }
  .pop-brands-section .sections-list .flex .item {
    /* % от .flex ок в scroll-x режиме (трек = viewport); в marquee — перебьём cqw */
    flex: 0 0 calc((100% - 10px) / 2.25);
    width: calc((100% - 10px) / 2.25) !important;
    min-width: calc((100% - 10px) / 2.25) !important;
    max-width: none !important;
    height: auto !important;
    min-height: 0 !important;
    margin: 0 !important;
    align-self: flex-start;
    box-sizing: border-box;
  }
  .pop-brands-section:not(.brands-marquee-active) .sections-list .flex .item:nth-child(n+11) {
    display: none !important;
  }
  .pop-brands-section .sections-list .item .name {
    border-bottom: none;
    padding: 8px 10px;
    box-sizing: border-box;
  }
  .pop-brands-section .sections-list .item .name .brand-logo-slot {
    aspect-ratio: 2 / 1;
    margin-bottom: 0;
    padding: 6px 10px;
    box-sizing: border-box;
  }
  .pop-brands-section .sections-list .item .name .brand-logo-slot img,
  .pop-brands-section .sections-list .item .name .brand-logo-slot img.img-fluid {
    max-width: 94%;
    max-height: 94%;
  }
  .pop-brands-section .loader-wrapper {
    margin-top: 12px;
    display: flex;
    justify-content: center;
  }
  /* «Все бренды»: база компактного pill (= .video-section__all--mob до ×1.15) */
  .pop-brands-section .showmore.wide {
    width: auto;
    max-width: none;
    min-width: 0;
    box-sizing: border-box;
    padding: 8px 14px;
    font-size: 13px;
    line-height: 1.2;
    font-weight: 600;
    border-radius: 4px;
    border: 1.5px solid rgba(140, 0, 20, 0.38);
    color: var(--color-black, #423b38);
    text-decoration: none;
    background: linear-gradient(
      165deg,
      #ffe9da 0%,
      var(--color-orange, #fcd9c2) 42%,
      #f3c4a0 100%
    );
    box-shadow:
      0 1px 0 rgba(255, 255, 255, 0.65) inset,
      0 2px 8px rgba(66, 59, 56, 0.1);
  }
  .pop-brands-section .showmore.wide:before {
    width: 18px;
    height: 18px;
    margin-right: 6px;
  }
  .pop-brands-section .showmore.wide:hover,
  .pop-brands-section .showmore.wide:focus-visible {
    color: #fff;
    text-decoration: none;
    border-color: var(--color-red, #8c0014);
    background: linear-gradient(
      165deg,
      #a31024 0%,
      var(--color-red, #8c0014) 48%,
      #6a0010 100%
    );
    box-shadow:
      0 1px 0 rgba(255, 255, 255, 0.14) inset,
      0 0 0 2px rgba(140, 0, 20, 0.1),
      0 4px 12px rgba(140, 0, 20, 0.22);
  }

  /* ------------------------------------------------------------------ */
  /* Бренды marquee ≤768: локальный viewport + rAF translate (custom.js) */
  /* Защита от прошлых багов:                                           */
  /*  - НЕ % ширины .item от трека при width:max-content (цикл→wrap→    */
  /*    белая стена). Item = cqw/vw от viewport (container-type).       */
  /*  - overflow:hidden только на узком .brands-marquee; track nowrap;  */
  /*    height:auto — клоны в одном ряду, секция/страница не раздуваются*/
  /*  - transform только на .flex; document/body/main не трогаем        */
  /* ------------------------------------------------------------------ */
  .pop-brands-section .brands-marquee {
    position: relative;
    width: 100%;
    box-sizing: border-box;
  }
  .pop-brands-section .brands-marquee.brands-marquee--on {
    overflow: hidden; /* узкий viewport: клип по ширине секции */
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    container-type: inline-size;
    container-name: tm-brands-marquee;
    /* высота = один ряд плиток (nowrap); не 100vh / не stretch */
    height: auto;
    max-height: none;
    /* drag: гориз. жест наш; вертикаль страницы — pan-y; страница не едет */
    touch-action: pan-y;
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
  }
  .pop-brands-section .brands-marquee.brands-marquee--on.is-dragging {
    cursor: grabbing;
  }
  .pop-brands-section .brands-marquee.brands-marquee--on .col-content,
  .pop-brands-section .brands-marquee.brands-marquee--on .sections-list {
    overflow: hidden;
    width: 100%;
    max-width: 100%;
    height: auto;
    min-height: 0;
  }
  .pop-brands-section .brands-marquee.brands-marquee--on .sections-list .flex {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important; /* style.css имеет wrap — иначе белая стена */
    align-items: stretch;
    align-content: flex-start;
    gap: 10px;
    /* max-content ок: ширина .item задана cqw, не % от этого трека */
    width: max-content !important;
    max-width: none !important;
    height: auto !important;
    min-height: 0 !important;
    margin-bottom: 0;
    padding-bottom: 0;
    overflow: visible !important;
    -webkit-overflow-scrolling: auto;
    overscroll-behavior-x: auto;
    will-change: transform;
    /* translate ставит custom.js (rAF); CSS @keyframes не используем */
  }
  .pop-brands-section .brands-marquee.brands-marquee--on .sections-list .flex .item {
    /* 100cqw = .brands-marquee; vw fallback без container queries */
    flex: 0 0 calc((100vw - 24px - 10px) / 2.25) !important;
    flex-basis: calc((100cqw - 10px) / 2.25) !important;
    width: calc((100vw - 24px - 10px) / 2.25) !important;
    width: calc((100cqw - 10px) / 2.25) !important;
    min-width: calc((100vw - 24px - 10px) / 2.25) !important;
    min-width: calc((100cqw - 10px) / 2.25) !important;
    max-width: calc((100vw - 24px - 10px) / 2.25) !important;
    max-width: calc((100cqw - 10px) / 2.25) !important;
    height: auto !important;
    min-height: 0 !important;
    align-self: flex-start;
    box-sizing: border-box;
  }
  .pop-brands-section .brands-marquee.brands-marquee--on .sections-list .flex .item .name,
  .pop-brands-section .brands-marquee.brands-marquee--on .sections-list .flex .item .name .brand-logo-slot {
    height: auto !important;
    max-height: none;
  }

  /* ------------------------------------------------------------------ */
  /* Доверие (benefits-mob): вертикальный стек 4 карт. на 100% ширины   */
  /* Жёсткий вертикальный gap ≥16px (style.css margin-bottom:9 /       */
  /* calc(50%-3px) перебиваем !important; belt: gap + margin-bottom)   */
  /* ------------------------------------------------------------------ */
  .benefits-mob {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0;
    padding-right: 0;
  }
  .benefits-mob__track {
    display: flex !important;
    flex-direction: column !important;
    flex-wrap: nowrap !important;
    /* gap 0 — вертикальный зазор только через margin-bottom .item
       (работает и если track отсутствует / display не flex) */
    gap: 0 !important;
    row-gap: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
    overflow: visible;
    padding-bottom: 0;
  }
  .benefits-mob .item,
  .benefits-mob__track > .item {
    display: flex !important;
    flex-direction: row !important;
    align-items: flex-start;
    gap: 12px;
    flex: none !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    margin-top: 0 !important;
    /* вертикальный gap ≥16px; перебивает прежний style.css mb:9 / calc(50%-3px) */
    margin-bottom: 16px !important;
    padding: 16px !important;
    min-height: 0 !important;
    height: auto !important;
    box-sizing: border-box;
    border-radius: 9px;
    background: #FFF; /* было в style.css .benefits-mob .item — база перенесена сюда */
    justify-content: flex-start !important;
    pointer-events: none;
    cursor: default;
    position: relative;
  }
  .benefits-mob .item:last-child,
  .benefits-mob__track > .item:last-child {
    margin-bottom: 0 !important;
  }
  .benefits-mob .item:before {
    display: none !important; /* старый checkmark; иконка из IMG_1 */
  }
  .benefits-mob .item .img {
    flex: 0 0 48px;
    width: 48px !important;
    max-width: 48px !important;
    margin: 0 !important;
    margin-bottom: 0 !important;
  }
  .benefits-mob .item .img img {
    display: block;
    width: 100%;
    height: auto;
  }
  .benefits-mob .item .text {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 13px;
    line-height: 130%;
  }
  .benefits-mob .item .name {
    font-size: 15px;
    font-weight: 600;
    line-height: 120%;
    margin-bottom: 6px;
  }
  .benefits-mob .item .desc {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
    font-size: 13px;
    line-height: 130%;
  }
  .benefits-mob .item .desc p {
    margin: 0;
    display: inline;
  }
  .benefits-mob .item a {
    display: none !important;
    pointer-events: none !important;
  }

  /* ------------------------------------------------------------------ */
  /* Акции: максимум 3 карточки                                         */
  /* ------------------------------------------------------------------ */
  .discount-section.blog-list .grid .item:nth-child(n+4) {
    display: none !important;
  }
  .discount-section.blog-list .grid .item {
    min-width: 100% !important;
    width: 100% !important;
    height: auto;
    min-height: 0;
    margin-bottom: 8px;
  }

  /* ------------------------------------------------------------------ */
  /* Блог: 2 карточки + «Все»                                           */
  /* ------------------------------------------------------------------ */
  .blog-list.blog-main .grid .item:nth-child(n+3) {
    display: none !important;
  }
  .blog-list.blog-main .grid .item {
    min-width: 100% !important;
    width: 100% !important;
    height: auto;
    min-height: 0;
    margin-bottom: 8px;
  }
  .blog-list.blog-main .loader-wrapper.link .showmore {
    width: 100%;
    max-width: 100%;
  }
  /* «больше статей» дубль на мобилке — прячем, оставляем «Перейти в блог» */
  .blog-list.blog-main .screen-mob {
    display: none !important;
  }

  /* ------------------------------------------------------------------ */
  /* Обратная связь / салоны — чуть плотнее                             */
  /* ------------------------------------------------------------------ */
  .main-engage__feedback-title {
    margin-bottom: 12px;
  }
  .salon-section h2 {
    margin-bottom: 12px;
  }
}


/* Brands marquee: prefers-reduced-motion → ручной scroll-x, без auto (JS teardown) */
@media (prefers-reduced-motion: reduce) {
  .pop-brands-section .brands-marquee.brands-marquee--on {
    overflow: visible;
  }
  .pop-brands-section .brands-marquee.brands-marquee--on .col-content,
  .pop-brands-section .brands-marquee.brands-marquee--on .sections-list {
    overflow: visible;
  }
  .pop-brands-section .brands-marquee.brands-marquee--on .sections-list .flex {
    transform: none !important;
    width: auto !important;
    max-width: none !important;
    flex-wrap: nowrap !important;
    flex-direction: row !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch;
    height: auto !important;
    will-change: auto;
  }
}

/* End */


/* Start:/local/templates/main/css/intro-hero.css?17905333051432*/
/* Homepage intro hero: quiet progress bars and a photo-only showroom overlay. */
.intro .slider .slick-dots {
  position: absolute;
  bottom: 4px;
  text-align: center;
  width: 100%;
  margin: 0;
  padding: 0 72px;
  display: flex;
  align-items: stretch;
}

.intro .slider .slick-dots li {
  list-style-type: none;
  display: inline-block;
  flex: 1;
  margin: 0 4px;
  border-radius: 8px;
}

.intro .slider .slick-dots button {
  width: 100%;
  height: 2px;
  border: 0;
  background-color: rgba(255, 255, 255, .28);
  opacity: 1;
  list-style-type: none;
  position: relative;
  font-size: 0;
  outline: none;
  border-radius: 8px;
  overflow: hidden;
}

.intro .slider .slick-dots li button:before {
  display: none;
}

.intro .slider .slick-dots button span {
  position: absolute;
  width: 100%;
  display: block;
  height: 100%;
  background: rgba(255, 255, 255, .88);
  left: 0;
  top: 0;
  transform: scaleX(0);
  transform-origin: left;
}

.slick-dots button.filled span {
  transform: scaleX(1) !important;
}

@media (max-width: 991px) {
  .intro .slider .slick-dots {
    padding-left: 24px;
    padding-right: 24px;
  }
}

.intro .showroom::after {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(to left, rgba(25, 20, 18, .72) 0%, rgba(25, 20, 18, .28) 42%, transparent 78%);
}

/* End */
/* /local/templates/main/css/home-mobile.css?179045821617378 */
/* /local/templates/main/css/intro-hero.css?17905333051432 */
