/* Локальные уточнения для восстановленной главной страницы. */
html,
body {
  overflow-x: hidden;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.mobile-menu {
  display: none;
}

/* Галерея на страницах товаров. */
.product-gallery-track {
  position: relative;
  width: 100%;
  height: 440px;
}

.product-gallery-slide {
  display: none !important;
  width: 100% !important;
  height: 100% !important;
  margin: 0 !important;
}

.product-gallery-slide.is-active {
  display: flex !important;
  align-items: center;
  justify-content: center;
}

.product-gallery-slide img {
  display: block;
  width: 100% !important;
  height: 100% !important;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.product-gallery-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin: 12px 0 4px;
}

.product-gallery-controls button {
  width: 42px;
  height: 38px;
  border: 2px solid #ec4520;
  border-radius: 9px;
  background: #fff;
  color: #ec4520;
  font-size: 23px;
  line-height: 1;
  cursor: pointer;
}

.product-gallery-controls span {
  min-width: 42px;
  color: #2d343d;
  font: 16px/1 LetoSansr, Arial, sans-serif;
  text-align: center;
}

/* Не показываем техническую полосу прокрутки старого слайдера. */
.product-gallery-track,
.product-gallery-track * {
  scrollbar-width: none;
}

.product-gallery-track::-webkit-scrollbar,
.product-gallery-track *::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.catalog-nav {
  position: relative;
  z-index: 20;
}

.menucathead {
  display: none;
  position: absolute;
  z-index: 100;
  top: calc(100% + 10px);
  left: 50%;
  width: 360px;
  box-sizing: border-box;
  padding: 10px 0;
  border-radius: 16px;
  background: #f7f6f5;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.12);
  transform: translateX(-50%);
}

.menucathead a {
  display: block;
  padding: 7px 20px;
  color: #ec4520;
  font: 500 18px/1.25 Arial, sans-serif;
  text-align: center;
  text-decoration: none;
}

.menucathead a:hover,
.menucathead a:focus-visible {
  background: rgba(236, 69, 32, 0.08);
  outline: none;
}

/* На главной первые позиции каждого раздела всегда видны, без автослайдера. */
.main-product-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.main-product-list > #foton-13html-id {
  width: auto;
  box-sizing: border-box;
  margin: 0;
}

/* На главной показываем ровно три товара в каждом разделе: без наложения
   следующих разделов на длинную сетку карточек. */
.main-product-list > #foton-13html-id:nth-child(n + 4) {
  display: none;
}

/* Проекты на широких экранах идут тремя равными колонками. */
#foton-32html-id {
  overflow: visible;
}

#foton-32html-id > #foton-22html-id {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  width: 100%;
  max-width: 1380px;
  gap: 24px;
}

#foton-32html-id > #foton-22html-id > #foton-34html-id {
  display: block;
  width: auto;
  margin: 0;
  box-sizing: border-box;
}

/* Верхняя строка шапки: четыре самостоятельные, ровно выстроенные группы. */
.head_includes > #foton-0head-id:first-child {
  display: flex;
  align-items: center;
  gap: 28px;
}

.head_includes > #foton-0head-id:first-child #foton-1head-id {
  flex: 0 0 25%;
}

.head_includes > #foton-0head-id:first-child #foton-4head-id {
  display: none;
}

.head_includes > #foton-0head-id:first-child #foton-5head-id {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  min-width: 0;
  width: auto;
}

.head_includes > #foton-0head-id:first-child #foton-7head-id {
  flex: 0 0 auto;
  margin-left: 7px;
  white-space: nowrap;
}

.head_includes > #foton-0head-id:first-child #foton-8head-id {
  flex: 0 0 auto;
  margin-left: 30px;
}

.head_includes > #foton-0head-id:first-child #foton-9head-id {
  flex: 0 1 auto;
  margin-left: 7px;
  white-space: nowrap;
}

.head_includes > #foton-0head-id:first-child #foton-9head-id > div {
  display: inline;
}

.head_includes > #foton-0head-id:first-child #foton-10head-id {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  width: auto;
  text-align: left;
}

.head_includes > #foton-0head-id:first-child #foton-11head-id {
  float: none;
  flex: 0 0 58px;
  width: 58px;
  height: 42px;
  top: 0;
  right: auto;
  margin-right: 12px;
}

.head_includes > #foton-0head-id:first-child #foton-13head-id {
  flex: 0 0 auto;
  max-width: none;
}

/* Заголовок каждой подборки центрируется в оранжевой плашке. */
#foton-8html-id {
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 430px;
  height: 96px;
  padding: 0 82px 0 36px;
  background-size: 100% 100%;
  text-align: center;
  line-height: 1.1;
}

#foton-11html-id {
  width: calc(100% - 450px);
  left: 450px;
}

@media (max-width: 650px) {
  .menucathead {
    width: min(360px, calc(100vw - 32px));
  }

  .menucathead a {
    padding-left: 20px;
    font-size: 17px;
  }

  #foton-8html-id {
    width: min(430px, calc(100vw - 48px));
  }

  #foton-11html-id {
    width: 100%;
    left: 0;
  }
}

@media (max-width: 1050px) {
  .head_includes > #foton-0head-id:first-child {
    flex-wrap: wrap;
  }

  .head_includes > #foton-0head-id:first-child #foton-5head-id {
    flex-basis: 60%;
  }
}

/* Компактная версия для телефонов и небольших планшетов. */
@media (max-width: 760px) {
  html,
  body,
  .head_includes,
  .html_includes,
  .item_includes,
  .foot_includes {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    box-sizing: border-box;
  }

  body {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  body {
    min-width: 0 !important;
  }

  /* Окно подтверждения заявки: на телефоне одна колонка без вылезшей
     декоративной картинки справа. */
  #foton-25foot-id.showResult {
    position: fixed;
    inset: 12px;
    width: auto !important;
    max-width: none !important;
    max-height: calc(100vh - 24px);
    box-sizing: border-box;
    overflow-y: auto;
    padding: 58px 22px 28px !important;
  }

  #foton-25foot-id #foton-27foot-id {
    display: block;
    width: 100%;
    margin: 0;
    text-align: center;
  }

  #foton-25foot-id #foton-28foot-id,
  #foton-25foot-id #foton-29foot-id {
    text-align: center;
    overflow-wrap: anywhere;
  }

  #foton-25foot-id #foton-28foot-id {
    font-size: clamp(28px, 8vw, 38px);
    line-height: 1.15;
  }

  #foton-25foot-id #foton-29foot-id {
    font-size: clamp(17px, 4.5vw, 22px);
    line-height: 1.35;
  }

  #foton-25foot-id #foton-30foot-id {
    float: none;
    width: 64px;
    height: 64px;
    margin: 22px auto 0;
  }

  #foton-25foot-id #foton-35foot-id {
    display: none !important;
  }

  #foton-25foot-id #foton-22foot-id {
    top: 12px;
    right: 14px;
  }

  .head_includes > #foton-0head-id:first-child {
    width: 100% !important;
    box-sizing: border-box;
    justify-content: center;
    gap: 12px;
    padding: 18px 16px 12px !important;
  }

  .head_includes {
    position: relative;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding-bottom: 7px;
  }

  .head_includes > #foton-0head-id:first-child #foton-1head-id {
    display: flex;
    flex: 0 0 100%;
    justify-content: center;
    align-items: center;
  }

  .head_includes > #foton-0head-id:first-child #foton-2head-id {
    width: 86px;
    height: auto;
  }

  .head_includes > #foton-0head-id:first-child #foton-3head-id {
    font-size: 21px;
    line-height: 18px;
    margin-left: 10px;
  }

  .head_includes > #foton-0head-id:first-child #foton-5head-id {
    display: none;
  }

  .head_includes > #foton-0head-id:first-child #foton-6head-id {
    width: 16px;
    height: auto;
  }

  .head_includes > #foton-0head-id:first-child #foton-7head-id,
  .head_includes > #foton-0head-id:first-child #foton-9head-id {
    font-size: 12px;
    line-height: 1.25;
  }

  .head_includes > #foton-0head-id:first-child #foton-8head-id {
    width: 13px;
    height: auto;
    margin-left: 7px;
  }

  .head_includes > #foton-0head-id:first-child #foton-10head-id {
    display: none;
  }

  .head_includes > #foton-0head-id:first-child #foton-11head-id {
    flex-basis: 44px;
    width: 44px;
    height: 38px;
    margin-right: 8px;
  }

  .head_includes > #foton-0head-id:first-child #foton-13head-id {
    width: 165px;
    height: 48px;
    font-size: 15px;
  }

  .head_includes > #foton-0head-id:nth-child(2) {
    display: none;
  }

  .head_includes > #foton-0head-id:nth-child(2) #foton-16head-id {
    width: auto !important;
    text-align: center;
  }

  .head_includes > #foton-0head-id:nth-child(2) #foton-17head-id {
    display: block;
    padding: 10px 4px !important;
    font-size: 14px;
    white-space: nowrap;
  }

  .menucathead {
    top: calc(100% + 4px);
    width: min(320px, calc(100vw - 24px));
  }

  .mobile-menu {
    display: block;
    position: absolute;
    z-index: 300;
    top: 23px;
    right: 18px;
  }

  .mobile-menu summary {
    display: grid;
    width: 48px;
    height: 44px;
    box-sizing: border-box;
    place-content: center;
    gap: 5px;
    border: 2px solid #ec4520;
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
    list-style: none;
  }

  .mobile-menu summary::-webkit-details-marker { display: none; }

  .mobile-menu summary span {
    display: block;
    width: 22px;
    height: 2px;
    border-radius: 2px;
    background: #ec4520;
  }

  .mobile-menu-panel {
    position: fixed;
    top: 92px;
    left: 50vw;
    right: auto;
    width: min(330px, calc(100vw - 32px));
    max-height: calc(100vh - 112px);
    box-sizing: border-box;
    padding: 18px;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 12px 30px rgba(0, 0, 0, .18);
    text-align: center;
    transform: translateX(-50%);
    overflow-y: auto;
  }

  .mobile-menu-panel nav {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .mobile-menu-panel nav a,
  .mobile-phone-link {
    display: block;
    box-sizing: border-box;
    padding: 11px 8px;
    border-radius: 9px;
    background: #f8f7f5;
    color: #ec4520;
    font-size: 16px;
    text-decoration: none;
  }

  .mobile-catalog-links {
    display: grid;
    gap: 8px;
    margin-top: 16px;
  }

  .mobile-main-links {
    display: grid;
    gap: 8px;
    margin-top: 8px;
  }

  .mobile-menu-panel .mobile-catalog-links a,
  .mobile-menu-panel .mobile-main-links a {
    border: 2px solid #ec4520;
    border-radius: 999px;
    background: #fff;
    color: #2d343d;
    font-size: 17px;
  }

  .mobile-max-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    margin-top: 14px;
    color: #2d343d;
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
  }

  .mobile-max-link img {
    display: block;
    width: 40px;
    height: 40px;
    object-fit: contain;
  }

  .mobile-phone-link {
    margin: 12px auto 0;
    max-width: 230px;
    color: #fff;
    background: #ec4520;
    font-weight: 700;
  }

  .mobile-contact-link,
  .mobile-address {
    display: block;
    margin: 12px 0 0;
    color: #2d343d;
    font-size: 14px;
    line-height: 1.35;
    text-decoration: none;
  }

  .mobile-address { margin-bottom: 0; }

  /* Главная: крупные категории и товары в две читаемые колонки. */
  #foton-0html-id {
    display: grid;
    grid-template-columns: 1fr;
    justify-items: center;
    width: calc(100% - 32px) !important;
    box-sizing: border-box;
    margin: 0 auto 16px !important;
    padding: 0 !important;
    background: transparent;
  }

  #foton-1html-id {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 1.78;
    box-sizing: border-box;
    margin: 0 auto 16px !important;
    justify-self: center;
    border-width: 3px;
  }

  #foton-3html-id {
    font-size: 22px;
    left: 18px;
    bottom: 16px;
  }

  #foton-4html-id {
    display: flex;
    align-items: center;
    justify-content: center;
    width: min(330px, calc(100% - 64px));
    box-sizing: border-box;
    top: 0;
    margin: 0 auto 18px;
    padding: 8px 10px 8px 18px;
    text-align: center;
    border-radius: 40px;
  }

  #foton-5html-id {
    font-size: 17px;
    line-height: 1.2;
    text-shadow: none;
  }

  #foton-6html-id {
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    box-sizing: border-box;
    border-width: 1px;
    background-size: 25px;
    margin-left: 9px;
  }

  .itemmain,
  #foton-7html-id {
    width: 100% !important;
    height: auto !important;
    box-sizing: border-box;
  }

  #foton-7html-id {
    padding: 0 16px 30px;
  }

  #foton-8html-id {
    position: relative;
    width: 100% !important;
    height: auto;
    min-height: 58px;
    padding: 12px 58px 12px 18px;
    font-size: 19px;
    line-height: 1.1;
  }

  #foton-10html-id {
    display: none;
  }

  #foton-11html-id {
    position: relative;
    left: 0;
    top: 0;
    width: 100% !important;
    overflow: visible;
    margin-top: 14px;
  }

  #foton-12html-id {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .main-product-list > #foton-13html-id:nth-child(n + 4) {
    display: none;
  }

  #foton-13html-id {
    width: auto !important;
    min-width: 0;
    box-sizing: border-box;
    margin: 0 !important;
    padding: 16px !important;
    background: #fff;
    box-shadow: 0 5px 20px rgba(51, 66, 78, 0.12);
  }

  #foton-14html-id {
    height: clamp(220px, 58vw, 420px);
  }

  #foton-15html-id {
    width: 100%;
    height: 100%;
    object-fit: contain;
  }

  #foton-16html-id {
    margin-top: 16px;
    font-size: 18px;
    line-height: 1.2;
  }

  #foton-17html-id,
  #foton-18html-id {
    margin-top: 8px;
    font-size: 24px;
  }

  /* Каталожные страницы и текстовые блоки. */
  #foton-0catalog-id,
  #foton-0contacts-id {
    width: calc(100% - 32px) !important;
    box-sizing: border-box;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  #foton-1catalog-id {
    display: grid;
    grid-template-columns: 1fr;
    width: calc(100% - 32px);
    max-width: none;
    box-sizing: border-box;
    overflow: visible;
    gap: 10px;
    padding: 10px 0 20px;
  }

  #foton-2catalog-id {
    width: 100%;
    box-sizing: border-box;
    margin: 0;
    text-align: center;
  }

  #foton-3catalog-id {
    padding: 12px 16px;
    font-size: 17px;
    line-height: 1.2;
  }

  #foton-17catalog-id {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
  }

  #foton-18catalog-id {
    width: auto !important;
    min-width: 0;
    box-sizing: border-box;
    margin: 0 !important;
    padding: 16px !important;
    min-height: 0;
  }

  #foton-20catalog-id {
    height: 220px;
    margin-bottom: 14px;
  }

  #foton-20catalog-id img {
    width: 100%;
    height: 100%;
    object-fit: contain;
  }

  #foton-21catalog-id {
    font-size: 18px;
    line-height: 1.3;
    overflow-wrap: anywhere;
  }

  #foton-22catalog-id,
  #foton-23catalog-id {
    display: block;
    margin-top: 8px;
    font-size: 24px;
    line-height: 1.2;
    overflow-wrap: anywhere;
  }

  #foton-40catalog-id {
    font-size: 16px;
    line-height: 1.45;
    padding: 18px;
  }

  /* Отзывы: одна карточка на экран, листаются жестом влево/вправо. */
  #foton-20html-id,
  #foton-31html-id {
    padding: 36px 16px !important;
  }

  #foton-21html-id,
  #foton-32html-id {
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }

  #foton-30html-id,
  #foton-31html-id,
  #foton-32html-id {
    width: 100% !important;
    box-sizing: border-box;
  }

  #foton-31html-id {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }

  #foton-21html-id::-webkit-scrollbar,
  #foton-32html-id::-webkit-scrollbar {
    display: none;
  }

  #foton-22html-id {
    display: flex;
    width: max-content;
    max-width: none;
    gap: 12px;
  }

  #foton-23html-id {
    flex: 0 0 calc(100vw - 64px);
    width: calc(100vw - 64px) !important;
    min-height: 390px;
    height: auto;
    box-sizing: border-box;
    margin: 0;
    padding: 28px;
    scroll-snap-align: center;
  }

  .review-controls {
    display: flex;
    justify-content: center;
    gap: 12px;
    position: relative;
    z-index: 5;
    margin: 34px 0 48px;
    pointer-events: auto;
  }

  .review-controls button {
    width: 46px;
    height: 40px;
    border: 2px solid #ec4520;
    border-radius: 10px;
    color: #ec4520;
    background: #fff;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    pointer-events: auto;
  }

  /* Карточки архитектурных проектов идут одна под другой, без свайпа. */
  #foton-32html-id {
    overflow: visible;
    scroll-snap-type: none;
  }

  #foton-32html-id > #foton-22html-id {
    display: grid !important;
    grid-template-columns: 1fr;
    width: 100%;
    gap: 24px;
    transform: none !important;
  }

  #foton-34html-id {
    display: block !important;
    width: 100% !important;
    box-sizing: border-box;
    height: auto !important;
    margin: 0 !important;
    transform: none !important;
  }

  #foton-36html-id,
  #foton-37html-id,
  #foton-38html-id,
  #foton-39html-id {
    margin-left: 0;
    padding-left: 0;
  }

  #foton-37html-id {
    font-size: 22px;
    line-height: 1.2;
  }

  #foton-38html-id {
    font-size: 16px;
    line-height: 1.4;
  }

  #foton-39html-id {
    display: inline-block;
    box-sizing: border-box;
    margin: 20px 0 0;
    padding: 14px 28px;
    font-size: 16px;
    line-height: 1.15;
    text-align: center;
  }

  #foton-40html-id {
    height: auto;
  }

  #foton-41html-id {
    display: block;
    height: auto;
    aspect-ratio: 1.6;
    object-fit: cover;
  }

  #foton-25html-id {
    font-size: 22px;
  }

  #foton-27html-id {
    font-size: 16px;
    line-height: 1.35;
  }

  /* Длинные информационные тексты должны сжиматься вместе с экраном. */
  #foton-42html-id {
    width: calc(100% - 32px) !important;
    box-sizing: border-box;
    margin: 32px auto !important;
    padding: 24px 18px !important;
    overflow-wrap: anywhere;
  }

  #foton-42html-id h1 {
    font-size: 28px;
    line-height: 1.15;
  }

  #foton-42html-id h2 {
    font-size: 22px;
    line-height: 1.2;
  }

  #foton-42html-id h3 {
    font-size: 20px;
    line-height: 1.2;
  }

  #foton-42html-id p,
  #foton-42html-id li {
    font-size: 16px;
    line-height: 1.45;
  }

  /* Страница контактов. */
  #foton-0contacts-id {
    text-align: center;
  }

  #foton-1contacts-id {
    text-align: center;
  }

  #foton-7contacts-id,
  #foton-8contacts-id {
    display: block;
    width: 100% !important;
    box-sizing: border-box;
    margin: 0;
    text-align: center;
  }

  #foton-7contacts-id {
    font-size: 30px;
    margin-bottom: 18px;
  }

  #foton-8contacts-id {
    padding: 22px 16px;
    font-size: 16px;
    line-height: 1.45;
    overflow-wrap: anywhere;
  }

  #foton-8contacts-id img {
    float: none !important;
    display: block;
    max-width: 100%;
    height: auto;
    margin: 0 auto 18px;
  }

  /* Карточка товара. */
  #foton-0item-id {
    width: calc(100% - 32px) !important;
    box-sizing: border-box;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-bottom: 28px;
  }

  #foton-1item-id {
    padding: 12px 0;
    font-size: 14px;
    line-height: 1.45;
  }

  #foton-13item-id {
    display: block;
    width: 100% !important;
    margin: 8px 0 14px;
    font-size: 26px;
  }

  #foton-14item-id {
    display: block;
    width: 100% !important;
    box-sizing: border-box;
    margin: 0;
    padding: 14px 12px 22px;
  }

  .product-gallery-track {
    height: 245px;
  }

  #foton-16item-id {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 10px;
  }

  #foton-17item-id {
    flex: 0 0 100%;
    width: 100% !important;
    height: 220px;
    box-sizing: border-box;
    margin: 0;
    scroll-snap-align: start;
  }

  #foton-18item-id {
    width: 100%;
    height: 100%;
    object-fit: contain;
  }

  #foton-19item-id,
  #foton-24item-id {
    width: auto;
    margin: 16px 12px 0;
    font-size: 16px;
    line-height: 1.45;
  }

  #foton-25item-id {
    display: block;
    margin: 18px 12px 12px;
    font-size: 25px;
  }

  #foton-26item-id {
    float: none;
    width: calc(100% - 24px);
    max-width: none;
    margin: 0 12px;
  }

  /* Футер складывается в одну колонку и не обрезается. */
  #foton-0foot-id {
    width: 100% !important;
    height: auto !important;
  }

  #foton-1foot-id,
  #foton-11foot-id {
    display: block;
    width: 100% !important;
    height: auto !important;
    box-sizing: border-box;
    padding: 28px 26px !important;
  }

  #foton-1foot-id {
    text-align: center;
  }

  #foton-2foot-id,
  #foton-3foot-id {
    vertical-align: middle;
  }

  #foton-3foot-id {
    text-align: left;
  }

  #foton-4foot-id,
  #foton-12foot-id {
    margin-top: 24px !important;
    text-align: center;
  }

  #foton-4foot-id {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
  }

  #foton-5foot-id {
    display: grid;
    width: min(320px, 100%);
    gap: 10px;
    margin: 28px auto 0;
  }

  #foton-6foot-id,
  #foton-7foot-id {
    box-sizing: border-box;
    width: 100% !important;
    min-height: 50px;
    margin: 0 !important;
    padding: 12px !important;
  }

  #foton-9foot-id {
    display: block;
    width: min(100%, 420px);
    box-sizing: border-box;
    margin: 28px auto 0;
    padding: 0;
    font-size: 14px;
    line-height: 1.45;
    text-align: center;
    white-space: pre-wrap;
    overflow-wrap: normal;
  }

  #foton-10foot-id {
    white-space: normal;
  }

  #foton-13foot-id {
    display: grid;
    gap: 12px;
    padding: 0 !important;
    text-align: center;
  }

  #foton-14foot-id {
    margin-bottom: 12px;
  }

  #foton-15foot-id {
    display: none;
  }
}

@media (max-width: 760px) {
  /* Перебивает старые стили слайдера у обновлённой галереи товара. */
  #foton-16item-id.product-gallery-track {
    display: block !important;
    height: 245px;
    overflow: hidden;
  }

  #foton-16item-id.product-gallery-track > #foton-17item-id.product-gallery-slide {
    display: none !important;
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
  }

  #foton-16item-id.product-gallery-track > #foton-17item-id.product-gallery-slide.is-active {
    display: flex !important;
    align-items: center;
    justify-content: center;
  }

  #foton-16item-id.product-gallery-track > #foton-17item-id.product-gallery-slide img {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain;
  }
}

@media (max-width: 460px) {
  .head_includes > #foton-0head-id:first-child #foton-5head-id {
    display: none;
  }

  .head_includes > #foton-0head-id:first-child #foton-6head-id {
    grid-column: 1;
    grid-row: 1;
  }

  .head_includes > #foton-0head-id:first-child #foton-7head-id {
    grid-column: 2;
    grid-row: 1;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .head_includes > #foton-0head-id:first-child #foton-8head-id {
    grid-column: 1;
    grid-row: 2;
    margin-left: 0;
  }

  .head_includes > #foton-0head-id:first-child #foton-9head-id {
    grid-column: 2;
    grid-row: 2;
    white-space: normal;
  }
}

/* Планшеты и компьютеры: заменяем фиксированную вёрстку исходного шаблона
   на сетки, которые не выходят за границы окна. */
@media (min-width: 761px) {
  .head_includes > #foton-0head-id {
    width: min(1380px, calc(100% - 48px));
    box-sizing: border-box;
  }

  .head_includes > #foton-0head-id:nth-child(2) {
    display: flex;
    align-items: center;
    gap: 20px;
  }

  .head_includes > #foton-0head-id:nth-child(2) #foton-16head-id {
    flex: 1 1 0;
    width: auto;
    min-width: 0;
    text-align: center;
  }

  .head_includes > #foton-0head-id:nth-child(2) #foton-17head-id {
    display: block;
    box-sizing: border-box;
    padding: 12px 8px;
    text-align: center;
    white-space: nowrap;
  }

  #foton-0html-id {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    width: min(1320px, calc(100% - 48px));
    box-sizing: border-box;
    padding: 30px 30px 94px;
  }

  #foton-1html-id {
    width: auto;
    min-width: 0;
    height: 146px;
    box-sizing: border-box;
    margin: 0;
  }

  #foton-2html-id {
    object-fit: cover;
  }

  #foton-3html-id {
    left: 18px;
    right: 18px;
    bottom: 16px;
    font-size: clamp(20px, 2vw, 30px);
    overflow-wrap: anywhere;
  }

  #foton-7html-id {
    display: grid;
    grid-template-columns: 330px minmax(0, 1fr);
    align-items: center;
    gap: 20px;
    width: min(1320px, calc(100% - 48px));
    height: auto;
    min-height: 340px;
    box-sizing: border-box;
  }

  #foton-8html-id {
    position: relative;
    top: auto;
    bottom: auto;
    width: 100%;
  }

  #foton-10html-id {
    display: none;
  }

  #foton-11html-id {
    position: relative;
    top: auto;
    left: auto;
    width: 100%;
    overflow: visible;
  }

  #foton-0foot-id {
    width: min(1380px, 100%);
    box-sizing: border-box;
  }
}

@media (min-width: 761px) and (max-width: 1099px) {
  .head_includes > #foton-0head-id:first-child {
    gap: 16px;
  }

  .head_includes > #foton-0head-id:nth-child(2) {
    gap: 10px;
  }

  #foton-0html-id {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #foton-1html-id {
    height: 190px;
  }

  #foton-7html-id {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 30px 0;
  }

  #foton-8html-id {
    width: min(430px, 100%);
    justify-self: center;
  }

  .main-product-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .head_includes > #foton-0head-id:first-child #foton-1head-id {
    justify-content: flex-start;
    box-sizing: border-box;
    padding-right: 64px;
  }

  .head_includes > #foton-0head-id:first-child #foton-2head-id {
    width: 72px;
  }

  .head_includes > #foton-0head-id:first-child #foton-3head-id {
    font-size: 18px;
    line-height: 16px;
  }
}
