/* главные стили */
:root {
  --accent-color: #ffe973; /* жёлтый */
  --container-padding: clamp(20px, 6.25vw, 120px);
  --category-width: min(333px, 100%);
  --product-card-width: min(336px, 100%);

  --fs-sm: clamp(0.7rem, 0.9vw, 0.85rem); /* ~12–14px */
  --fs-md: clamp(0.85rem, 1.3vw, 0.9rem); /* ~14–16px */
  --fs-lg: clamp(0.9rem, 1.9vw, 1.2rem); /* ~16–20px */
  --fs-xl: clamp(1.2rem, 2.25vw, 1.25rem); /* 20-24px */
  --fs-xxl: clamp(1.4rem, 2.4vw, 1.7rem); /* 24-28px */

  --text-color: #000000; /* основной текст */

  --cart-bg: red;
  --cart-text: white;
}

.red-theme {
  --accent-color: #ff4c3f; /* красный */
  --text-color: #ffffff;

  --cart-bg: #ffa900;
  --cart-text: #000000;
}

/* Утилиты */
.limit-text-to-2-lines {
  display: -webkit-box;
  -webkit-line-clamp: 2; /* что обрызает текст если что удалить */
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Базовые стили */
html,
body {
  max-width: 100%;
  overflow-x: hidden;
  margin: 0;
  padding: 0;
  /* color: var(--text-color); */
  background-color: #ffffff;
  margin: 0;
  font-family: "Inter", sans-serif;
}
* {
  box-sizing: border-box;
  max-width: 100vw; /* ← ВАЖНО: ограничивает максимальную ширину */
}
button[type="button"] {
  background: none;
  border: none;
  font-family: inherit;
  cursor: pointer;
}
.layout {
  min-height: 100vh; /* вся высота экрана */
  display: flex;
  flex-direction: column;
}

/* Основная структура */
.main-content {
  flex: 1;
  width: 100%;
}

.categories-and-text {
  display: flex;
  margin-top: 0px;
  width: 100%;
  gap: 25px;
  padding: 0 var(--container-padding);
  box-sizing: border-box;
}

.page-layout {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  width: 100%;
  max-width: 100vw;
}

/* These styles will limit text to 2 lines. Anything
   beyond 2 lines will be replaced with "..." */
.limit-text-to-2-lines {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/*  * {
  outline: 1px solid red;
}  Так видно, что тянет страницу вправо. */

.header-fixed ~ .category-list {
  display: none !important;
}

.category-list {
  height: auto;
  width: var(--category-width);
  flex-shrink: 0;
  margin-top: 25px;

  display: block;
  position: relative;
  width: 100%;
  max-width: 333px;
}

.header-fixed ~ main .page-content {
  margin-left: 0;
  padding-left: 0;
  width: 100%;
}

.category-item button {
  border: none;
  background: none;
  cursor: pointer;
  text-align: start;
}
.category-item a {
  text-decoration: none;
}
.read-more-btn {
  text-decoration: none;
  border: none;
  background-color: none;
  color: var(--accent-color);
  font-weight: 700;
}
.category-item {
  position: relative;
  margin-top: 17px;
}
.category-item:first-child {
  margin-top: 0;
}

/* заголовок категории */
.category-header {
  display: flex;
  align-items: center;
  width: 100%;
  justify-content: space-between;
  padding: 0;
}

.category-header img {
  object-fit: contain;
  width: 35px;
  height: 35px;
  display: flex;
  align-items: flex-start;
  margin-top: -10px;
}
.category-name {
  flex: 1;
  margin: 0 10px;
  font-weight: 400;
  font-size: var(--fs-md);
  margin-left: 13px;
}

.arrow svg {
  width: 10px;
  height: 10px;
}
.sub-arrow svg {
  width: 8px;
  height: 10px;
}
.arrow {
  transition: transform 0.3s ease;
  color: var(--accent-color);
  font-size: 11px;
  margin-left: -10px;
}
.arrow.down {
  transform: rotate(90deg);
}

/* первый дропдаун — вниз */
.category-dropdown {
  display: none;
  flex-direction: column;
  margin-top: 5px;
  margin-left: 50px;
  background-color: #f4f4f4;
  border-radius: 10px;
  padding-top: 2px;
  gap: 8px;
}

.category-dropdown.active {
  display: flex;
}

/* подкатегории */
.subcategory {
  position: relative;
  padding: 5px 8px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.subcategory-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  gap: 40px;
}

.subcategory-title {
  /* текст займет все доступное пространство */
  flex: 1;
  font-size: var(--fs-sm);
}

.subcategory-title:hover {
  color: #ff4c3f;
}

.sub-arrow {
  margin-left: 15px; /* расстояние между текстом и стрелкой */
  flex-shrink: 0; /* чтобы стрелка не сжималась */
  transition: transform 0.3s ease;
  color: #000000;
}

.sub-arrow.right {
  transform: rotate(-90deg);
}

/* второй уровень — появляется справа */
.subcategory-dropdown {
  position: absolute;
  top: 0;
  left: 100%;
  margin-left: 10px;
  background-color: #fff;
  border: 1px solid #ddd;
  border-radius: 6px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
  padding: 0px;
  display: none;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  max-width: 277px;
  min-width: 150px;
  z-index: 10;
}
.subcategory-link {
  color: inherit; /* наследует цвет от родителя */
  text-decoration: none; /* убирает подчеркивание */
  font-size: var(--fs-sm);
}

.subcategory-dropdown a {
  text-decoration: none;
  border-bottom: 1px solid #c8c8c8;
  padding: 5px 5px 10px 18px;
  margin: 0;
  cursor: pointer;
}
.subcategory-dropdown a:first-child {
  border-bottom: 1px solid #c8c8c8;
  padding: 17px 5px 10px 18px;
  margin: 0;
  cursor: pointer;
}

.subcategory-dropdown.active {
  display: flex; /* was flex */
}

.subcategory a:hover {
  color: #ff4c3f;
}
.subcategory-dropdown {
  border-bottom: 2px solid #eee;
}

/* кнопка, которая появляется при скролле */

/* логотип, который может меняться */
.shop-logo {
  transition: 0.3s ease;
}

aside {
  margin-right: 20px;
}

.categories-and-ads {
  display: flex; /* две колонки */
  margin-top: 0px;
  /* flex-wrap: wrap;  чтобы при маленьком экране элементы переносились */
  /* margin-left: 120px; */
}
.advertisement {
  display: flex;
  gap: 31px;
  margin-top: 25px;
  flex-wrap: nowrap;
  justify-content: center;
  width: 100%;
  box-sizing: border-box;
  padding: 0 var(--container-padding);
}

.advertisement-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.advertisement-image-1,
.advertisement-image-2,
.advertisement-image-3 {
  flex: 1;
  width: clamp(300px, 25vw, 423px);
  height: 713px;
  object-fit: cover;
  border-radius: 15px;
}

.section-header h3 {
  font-size: var(--fs-xl);
}

/* product-list */

.product-list-container,
.sale-product-list-container {
  margin-top: 36px;
  width: 100%;
  box-sizing: border-box;
  transition: all 0.3s ease;
}

.products {
  width: 100%;
  max-width: 100%;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0;
  justify-items: center;
  transition: width 0.3s ease;
}

/* Границы для 4 колонок */
.products .product-card {
  border-right: 1px solid #b9b9b9;
  border-bottom: 1px solid #b9b9b9;
}

.products .product-card:nth-child(5n) {
  border-right: none;
}

/*.products .product-card:nth-child(n + 5):nth-child(-n + 8) {
  border-bottom: none;
}*/
/* Границы для 5 колонок */
body.header-fixed-active .products .product-card {
  border-right: 1px solid #b9b9b9;
  border-bottom: 1px solid #b9b9b9;
}

/*body.header-fixed-active .products .product-card:nth-child(5n) {
  border-right: none;
}*/

/* Только первые 5 товаров имеют нижнюю границу */
/* body.header-fixed-active .products .product-card:nth-child(n + 6) {
  border-bottom: none;
} */

/*body.header-fixed-active
  .products
  .product-card:nth-child(5n):nth-child(-n + 8) {
  border-bottom: 1px solid #b9b9b9;
} */

.product-card {
  width: 100%;
  /*max-width: var(--product-card-width);*/
  height: 370px;
  min-width: 250px; /* МИНИМАЛЬНАЯ ширина */
  border-right: 1px solid #b9b9b9;
  border-bottom: 1px solid #b9b9b9;
  padding: 20px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  cursor: default;
}

/* Стили для ссылок */
.product-image-link {
  text-decoration: none;
}

.product-title-link {
  text-decoration: none;
  color: inherit;
}
/*.product-title-link:hover h3 {
  color: var(--accent-color);
  text-decoration: underline;
  transition: all 0.3s ease;
} if need add*/

/* Стили для кнопок */
.favorite-btn,
.compare-btn,
.add-to-cart-btn {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.compare-btn {
  padding: 8px;
  border-radius: 4px;
}
.compare-btn:hover,
.favorite-btn-tovar:hover {
  background: #f5f5f5;
  color: #ff4c3f;
}
.favorite-btn {
  position: absolute;
  top: 5px;
  right: 10px;
  width: 23px;
  height: 23px;
  z-index: 2;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 50%;
  padding: 3px;
}

.product-heart {
  width: 21px;
  height: 21px;
  object-fit: contain;
  transition: transform 0.2s ease;
}

.favorite-btn:hover .product-heart {
  transform: scale(1.1);
}

/* контейнер для фото и сердечка */
.image-container {
  position: relative;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.product-image {
  width: 100%;
  max-width: 180px;
  height: 205px;
  object-fit: contain;
}

/* название */
.product-card h3 {
  font-size: var(--fs-md);
  margin: 10px 0;
  font-weight: 400;
  line-height: 1.4;
  max-width: 293px;
 /* min-height: 48px; */ /* чтобы у всех карточек под заголовком была одинаковая высота */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden; /*added these styles. add this for others too. */
  /*text-overflow: ellipsis; if need add*/
  /*min-height: calc(1.3em * 2); если что добавить что бы ровно 2 строки */
}

/* блок с ценой и иконками */
.price-and-icons {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  min-width: 0;
}

/* цены */
.price-block {
  display: flex;
  flex-direction: column;
  margin-right: 10px;
  flex: 1; /* ДОБАВИТЬ - занимает доступное пространство */
  min-width: 0; /* ДОБАВИТЬ - разрешает сжатие текста */
  overflow: hidden; /* ДОБАВИТЬ - скрывает выходящий текст */
}

.old-price {
  text-decoration: line-through;
  color: #5c5c5c;
  font-size: var(--fs-md);
  margin: 0;
  font-weight: 400;
  line-height: 129%;
  letter-spacing: -0.07em;
}

.sale-price,
.sale-price2 {
  color: var(--accent-color);
  font-weight: 500;
  font-size: var(--fs-xl);
  margin: 0;
  line-height: 129%;
  letter-spacing: -0.07em;
}

.sale-price2 {
  color: #FF4C3F;
}

.price {
  font-weight: 500;
  font-size: var(--fs-lg);
  line-height: 129%;
  letter-spacing: -0.07em; /* ЗАМЕНИТЬ -7% на em */
  color: #585858;
}
.old-price.hidden {
  visibility: hidden; /* элемент занимает место, но не виден */
}
.old-price,
.sale-price,
.sale-price2,
.price {
  white-space: nowrap; /* текст в одну строку */
  overflow: hidden; /* скрываем выходящий текст */
  text-overflow: ellipsis; /* добавляем "..." если текст не помещается */
  max-width: 100%; /* ограничиваем ширину */
  display: block; /* делаем блочным элементом */
}

/* иконки справа */
.icons {
  display: flex;
  align-items: center;
  gap: 10px;
 /* margin-top: 15px; */
}
/* Стили для счетчиков */
.icon-counter {
  position: absolute;
  top: -9px;
  right: -8px;
  background-color: var(--cart-bg);
  color: var(--cart-text);
  font-size: 12px;
  font-weight: bold;
  min-width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2px;
  opacity: 0;
  transform: scale(0);
  transition: all 0.3s ease;
}
.compare-counter {
  top: -12px;
  right: -10px;
}

.compare-btn,
.add-to-cart-btn {
  position: relative; /* Для позиционирования счетчика */
}

/* Показываем счетчик когда есть значение */
.cart-counter:not([data-count="0"]),
.compare-counter:not([data-count="0"]) {
  opacity: 1;
  transform: scale(1);
}

/* Анимация при добавлении */
@keyframes bounce {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.3);
  }
}

.icon-counter.added {
  animation: bounce 0.3s ease;
}
.icons img {
  cursor: pointer;
  object-fit: contain;
}

/* индивидуальные стили */
.icons img.vector-icon {
  width: 33px;
  height: 25px;
}

.icons img.cart-icon {
  width: 40px;
  height: 40px;
  background-color: var(--accent-color);
  padding: 5px;
  border-radius: 5px;
}

/* Кнопка */
.more-products-button-container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 33px;
  transition: all 0.3s ease;
}

.more-products-button {
  width: min(300px, 72vw);
  height: 66px;
  font-size: var(--fs-lg);
  color: #5f5f5f;
  border: 2px solid #cbcbcb;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
  text-align: center;
  white-space: nowrap;
}

/* Вторая реклама */
.advertisement2 {
  width: 100%;
  margin-top: 38px;
  display: flex;
  gap: 16px;
  flex-wrap: nowrap;
  justify-content: center;

  padding: 0 var(--container-padding);
  box-sizing: border-box;
  transition: all 0.3s ease;
}

.advertisement2 img {
  flex: 1;
  min-width: min(300px, 100%);
  max-width: 420px;
  height: 338px;
  object-fit: cover;
  border-radius: 11px;
}

.sale-products-text-container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 65px;
}

.sale-products-text {
  font-size: var(--fs-xxl);
  color: #ff0000;
  font-weight: 600;
  text-align: center;
}

.welcome-text-container {
  width: 100%;
  max-width: 1357px;
  margin-top: 52px;
  padding: 20px;
  box-sizing: border-box;
  transition: all 0.3s ease;
  width: calc(100% - 104px);
}

.welcome-text {
  width: 100%;
  font-size: var(--fs-xl);
  font-weight: 400;
  color: #565656;
  line-height: 1.5; /* межстрочный интервал */
}

.welcome-text-container h3 {
  font-weight: 600;
  font-size: var(--fs-xxl);
  margin-bottom: 20px;
  color: #000000;
  line-height: 1.3;
}

.welcome-text-container p {
  font-weight: 400;
  color: #565656;
  font-size: var(--fs-sm);
  margin-bottom: 15px; /* отступы между параграфами */
  line-height: 1.6; /* лучшая читаемость */
}

.welcome-text-container span {
  display: block;
  text-align: right;
  margin-top: 20px;
  font-weight: 700;
  font-size: var(--fs-sm);
  color: var(--accent-color);
  cursor: pointer;
  width: 100%;
  transition: color 0.3s ease, transform 0.2s ease; /* анимации */
}

/* СТИЛИ ДЛЯ СКРОЛЛА */
/* Когда header фиксирован и меню скрыто */

/* body.header-fixed-active .page-layout {
} */
body.header-fixed-active .advertisement2,
body.header-fixed-active .welcome-text-container {
  margin-left: 0;
  width: 100%;
  max-width: 100%;
}

/* Увеличиваем .advertisement2 img */
body.header-fixed-active .advertisement2 img {
  max-width: 537px;
  height: 379px;
}

/* Увеличиваем welcome-text-container */
/* body.header-fixed-active .welcome-text-container .welcome-text {
} */
/* 
body.header-fixed-active .welcome-text {
} */
/* check to make correct */

/* Скрытие оригинального меню при фиксированном хедере */
#category-list.hidden-original-menu {
  display: none !important;
}

/* Стили для продуктов - ВСЯ ЛОГИКА В CSS */

/* === notification base === */
.notification {
  max-width: 320px;
  font-size: var(--fs-sm);
  line-height: 1.3;
}

/* МЕДИА-ЗАПРОСЫ ДЛЯ АДАПТИВНОСТИ */

/* Для экранов 1600px и меньше */
@media (max-width: 1600px) {
  /* Общие стили для контейнеров */
  .categories-and-text {
    padding-left: 40px;
    padding-right: 40px;
  }

  /* Рекламные баннеры */
  .advertisement,
  .advertisement2 {
    justify-content: center;
    flex-wrap: nowrap;
  }

  .advertisement-image-1,
  .advertisement-image-2,
  .advertisement-image-3 {
    max-width: min(360px, 28vw);
    height: auto;
    aspect-ratio: 9/16;
  }

  .advertisement2 img {
    max-width: min(370px, 30vw);
    height: auto;
    aspect-ratio: 16/9;
  }

  /* Продукты */
  .products {
    /* grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); */
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  /* Для 5 колонок на маленьких экранах */
  .products.grid-5-columns {
    grid-template-columns: repeat(4, 1fr);
    max-width: 100%;
  }

  /* При фиксированном хедере */
  body.header-fixed-active .advertisement2 img {
    max-width: 450px;
    height: 320px;
  }

  .icons {
    gap: 15px;
  }
  .icons img.vector-icon {
    width: 30px;
  }
  .icons img.cart-icon {
    width: 40px;
    height: 40px;
  }
  .products .product-card:nth-child(5n) {
    border-right: 1px solid #b9b9b9;
  }
  .products .product-card:nth-child(4n) {
    border-right: none;
  }
}

/* Для экранов 1400px и меньше */
@media (max-width: 1400px) {
  .categories-and-text {
    padding-left: clamp(15px, 2.5vw, 30px);
    padding-right: clamp(15px, 2.5vw, 30px);
  }

  .category-list {
    max-width: min(280px, 25vw);
  }

  .advertisement-image-1,
  .advertisement-image-2,
  .advertisement-image-3 {
    max-width: min(315px, 25vw);
    height: 740px;
  }

  .advertisement2 img {
    max-width: 330px;
    height: 250px;
  }
  /* Автоматически рассчитываем количество колонок */
  .products {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    padding: 0 clamp(10px, 2vw, 20px);
  }

  .products.grid-5-columns {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    max-width: 100%;
    width: 100%;
  }

  /* Корректируем размер карточек */
  .product-card {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  /* При фиксированном хедере */
  body.header-fixed-active .advertisement2 {
    padding-left: 30px;
    padding-right: 30px;
    gap: 20px;
  }

  body.header-fixed-active .advertisement2 img {
    max-width: 380px;
    height: 280px;
  }

  body.header-fixed-active .welcome-text-container {
    padding-left: 40px;
    padding-right: 40px;
  }
}

/* Для экранов 1200px и меньше */
@media (max-width: 1200px) {
  .navbar {
    display: none;
  }
  .categories-and-text {
    padding-left: clamp(15px, 2vw, 25px);
    padding-right: clamp(15px, 2vw, 25px);
    gap: 20px;
  }

  .category-list {
    display: none !important;
  }

  .advertisement {
    justify-content: center;
    gap: 20px;
  }

  .advertisement-image-1,
  .advertisement-image-2,
  .advertisement-image-3 {
    max-width: 350px;
    height: 500px;
  }

  /* .advertisement2,
  .welcome-text-container {
    margin-left: 0;
    width: 100%;
  } */

  .advertisement2 {
    justify-content: center;
    flex-wrap: nowrap;
    gap: 10px;
    padding: 0 10px;
  }

  .advertisement2 img {
    max-width: 330px;
    height: 240px;
  }

  .products.grid-5-columns {
    grid-template-columns: repeat(3, 1fr) !important;
    padding: 0;
    width: 100%;
  }

  .product-card {
    width: 100%;
    max-width: 100%;
    /* border-right: 1px solid #b9b9b9 !important;
    border-bottom: 1px solid #b9b9b9 !important; */
  }

  /* Каждую 3-ю карточку без правой границы */
  .products.grid-5-columns .product-card:nth-child(3n) {
    border-right: none !important;
  }

  /* Убираем нижнюю границу у последних 3 карточек */
  .products.grid-5-columns .product-card:nth-last-child(-n + 3) {
    border-bottom: none !important;
  }

  .welcome-text-container {
    padding: 20px;
    max-width: 100%;
    margin-left: 0;
    width: 100%;
  }

  /* При фиксированном хедере */
  body.header-fixed-active .advertisement2 {
    padding-left: 20px;
    padding-right: 20px;
  }

  body.header-fixed-active .advertisement2 img {
    max-width: 320px;
    height: 240px;
  }
  .products--home .product-card:nth-child(4n) {
    border-right: 1px solid #b9b9b9 !important;
  }
  .products--home .product-card:nth-child(3n) {
    border-right: none !important;
  }
}

/* Для экранов 768px и меньше (мобильные) */
@media (max-width: 768px) {
  .categories-and-text {
    padding-right: 0px;
  }

  /* Advertisement первый блок */
  .advertisement {
    display: flex;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
    gap: 15px;
    padding: 10px var(--container-padding) 20px;
    margin-top: 20px;
    justify-content: flex-start; /* Важно! */
    flex-wrap: nowrap;
  }

  /* Скрываем скроллбар в Chrome/Safari */
  .advertisement::-webkit-scrollbar {
    display: none;
  }

  .advertisement-link {
    flex: 0 0 auto; /* Не сжимается */
    display: block;
    scroll-snap-align: start; /* Snap эффект */
    min-width: 40vw;
  }

  .advertisement-image-1,
  .advertisement-image-2,
  .advertisement-image-3 {
    width: 100%;
    height: 300px; /* Уменьшаем высоту для мобильных */
    border-radius: 12px;
    object-fit: cover;
  }

  /* Advertisement2 второй блок */
  .advertisement2 {
    display: flex;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    gap: 12px;
    padding: 10px var(--container-padding) 20px;
    margin-top: 20px;
    justify-content: flex-start;
    flex-wrap: nowrap;
  }

  .advertisement2::-webkit-scrollbar {
    display: none;
  }

  .advertisement2 .advertisement-link {
    flex: 0 0 auto;
    display: block;
    scroll-snap-align: start;
    min-width: 40vw;
    max-width: 250px;
  }

  .advertisement2 img {
    width: 100%;
    height: 200px; /* Уменьшаем высоту для мобильных */
    border-radius: 10px;
    object-fit: cover;
  }

  /* Добавляем отступ справа для последнего элемента */
  .advertisement-link:last-child,
  .advertisement2 .advertisement-link:last-child {
    margin-right: var(--container-padding);
  }

  .scroll-indicators {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 10px;
    padding-bottom: 10px;
  }

  .indicator {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: #e0e0e0;
    transition: all 0.3s ease;
  }

  .indicator.active {
    background-color: var(--accent-color);
    transform: scale(1.2);
  }

  /* Анимация для плавного скролла */
  .advertisement,
  .advertisement2 {
    transition: scroll-behavior 0.3s ease;
  }

  /* Подсказка пользователю, что можно скроллить (это нужно для products) 
  .advertisement::after,
  .advertisement2::after {
    content: "";
    position: absolute;
    right: var(--container-padding);
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ccc'%3E%3Cpath d='M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0.7;
    pointer-events: none;
  } */

  /* фикс для контейнеров */
  .page-layout {
    overflow-x: hidden !important;
  }

  .main-content {
    overflow-x: hidden !important;
  }

  .product-card {
    height: auto;
    /* min-height: 200px; */
    width: 100%;
    max-width: 100%;
    min-width: 0;
    border-bottom: 1px solid #b9b9b9;
    padding: 15px;
  }

  /* Убираем границу у последней карточки */
  .product-card:last-child {
    border-bottom: none !important;
  }

  .product-card:nth-child(3n) {
    border-right: none;
  }

  /* Убираем все nth-child стили */
  .product-card:nth-child(4n),
  .product-card:nth-child(n + 5) {
    border-right: 1px solid #b9b9b9 !important;
    border-bottom: 1px solid #b9b9b9 !important;
  }

  .products--home .product-card:nth-child(4n) {
    border-right: none !important;
  }

  .product-card h3 {
    min-height: 40px;
  }

  .product-card .favorite-btn {
    position: absolute;
    top: 0;
    right: 0;
    width: 17px;
    height: 17px;
    padding: 1px;
  }

  /* Также исправляем изображение внутри */
  .product-card .favorite-btn img.product-heart {
    width: 17px;
    height: 17px;
  }

  /* Для иконок сравнения и корзины */
  .icons img.vector-icon {
    width: 25px;
    height: 20px;
  }

  .icons img.cart-icon {
    width: 35px;
    height: 35px;
    padding: 4px;
  }
  .icon-counter {
    min-width: 15px;
    height: 15px;
    padding: 1px;
  }
  .compare-counter {
    top: -12px;
    right: -10px;
  }

  /* Адаптируем всю область price-and-icons */
  .price-and-icons {
    flex-wrap: nowrap;
    gap: 10px;
  }

  .price-block {
    width: 100%;
  }

  .icons {
    gap: 15px;
  }

  /* При фиксированном хедере */
  body.header-fixed-active .advertisement2 img {
    max-width: 100%;
    height: 200px;
  }

  body.header-fixed-active .welcome-text-container {
    padding: 20px;
  }

  /* body.header-fixed-active .welcome-text p {
    font-size: 16px;
  } */

  body.header-fixed-active .read-more-btn {
    padding: 12px 30px;
  }

  body.header-fixed-active .advertisement,
  body.header-fixed-active .advertisement2 {
    margin-left: 0;
    padding-left: var(--container-padding);
    padding-right: var(--container-padding);
    width: 100%;
  }
}

/* Для экранов 480px и меньше */
@media (max-width: 480px) {
  .categories-and-text {
    padding-left: clamp(8px, 3vw, 15px);
  }

  .advertisement {
    gap: clamp(8px, 2vw, 12px);
  }

  .advertisement-link {
    min-width: clamp(35vw, 20vw, 40vw);
    max-width: 200px;
  }

  .advertisement-image-1,
  .advertisement-image-2,
  .advertisement-image-3 {
    height: clamp(200px, 85vh, 269px);
    width: clamp(160px, 55vw, 200px);
    border-radius: clamp(8px, 2vw, 12px);
  }

  .advertisement2 {
    gap: clamp(6px, 2vw, 10px);
  }

  .advertisement2 .advertisement-link {
    max-width: 300px;
  }

  .advertisement2 img {
    height: clamp(150px, 40vh, 180px);
    border-radius: clamp(6px, 2vw, 10px);
  }

  .products {
    grid-template-columns: 1fr 1fr;
    padding-right: clamp(8px, 3vw, 15px);
  }

  .product-card {
    max-width: 100%;
    padding: clamp(12px, 3vw, 20px) clamp(8px, 2vw, 15px);
  }

  .product-image {
    height: 130px;
    max-width: 130px;
  }

  .more-products-button {
    width: clamp(85%, 90%, 95%);
    height: clamp(50px, 60px, 70px);
  }

  .sale-products-text-container {
    margin-top: 30px;
  }
}

/* ====== ГОРИЗОНТАЛЬНЫЙ СКРОЛЛ НА МОБИЛЬНЫХ ====== */

/* Индикаторы прокрутки (дополнительно, по желанию) */
.advertisement-container,
.advertisement2-container {
  position: relative;
}

.scroll-indicators {
  display: none;
}

/* ============================================
   ОБЩИЕ СТИЛИ ДЛЯ ВСЕХ СТРАНИЦ
   ============================================ */

/* Скрываем только меню категорий при скролле */
#category-list.hidden-category-list {
  display: none !important;
}

/* ============================================
   СТИЛИ ТОЛЬКО ДЛЯ ГЛАВНОЙ СТРАНИЦЫ (home)
   ============================================ */

/* Базовое состояние - 4 колонки, 8 товаров */

body[data-page="home"] .product-card.hidden-product {
  display: none;
}

body[data-page="home"].header-fixed-active .product-card.hidden-product {
  display: flex;
}

/* Расширенные элементы только на главной */
/* body[data-page="home"].header-fixed-active .more-products-button-container, */
body[data-page="home"].header-fixed-active .advertisement2,
/* body[data-page="home"].header-fixed-active .sale-products-text-container, */
body[data-page="home"].header-fixed-active .welcome-text-container {
  width: 1680px;
  margin-left: auto;
  margin-right: auto;
}

/* ============================================
   СТИЛИ ДЛЯ СТРАНИЦЫ КАТЕГОРИЙ (category)
   ============================================ */

body[data-page="category"].header-fixed-active .more-products-button-container,
body[data-page="category"].header-fixed-active .advertisement2,
body[data-page="category"].header-fixed-active .sale-products-text-container,
body[data-page="category"].header-fixed-active .welcome-text-container {
  /* Сохраняем исходную ширину */
  width: auto;
  margin-left: 0;
  margin-right: 0;
}

/* Фильтры должны оставаться видимыми на странице категории */
body[data-page="category"] .category-checkbox-container {
  display: block;
}

/* Только на главной меняем на 5 колонок */
body[data-page="home"].header-fixed-active .products {
  grid-template-columns: repeat(6, 1fr);
  width: 1680px;
}
/* На странице категории при скролле - добавляем отступ фильтрам */
body[data-page="category"].header-fixed-active #filter-sidebar {
  margin-top: 250px; /* Отступ от фиксированного хедера */
}

/* Фильтры всегда видны */
body[data-page="category"] #filter-sidebar {
  display: block;
}

/* Категории скрываются */
body[data-page="category"] #category-list.hidden-category-list {
  display: none;
}

/* ========== АДАПТИВНАЯ СИСТЕМА ДЛЯ МОБИЛЬНЫХ (ДО 768PX) ========== */

@media (max-width: 768px) {
  /* Общие стили для контейнеров */
  .product-list-container,
  .sale-product-list-container {
    padding-right: 15px;
    position: relative;
    overflow: hidden;
    margin-top: 36px;
  }

  .products-wrapper {
    width: 100%;
    max-width: 100vw;
    overflow: hidden;
    position: relative;
  }

  /* Контейнер со всеми страницами */
  .products {
    padding: 0;
  }

  /* Страница с 4 продуктами (2x2) */
  .products-page {
    width: 100%;
    flex-shrink: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    gap: 0;
    margin: 0;
    padding: 0;
  }

  /* Карточки товаров внутри страницы */
  .products-page .product-card {
    width: 100%;
    height: auto;
    min-height: 320px;
    max-width: 100%;
    min-width: 0;
    padding: 15px;
    margin: 0;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    border: none !important;
  }

  /* ПРАВИЛЬНЫЕ ГРАНИЦЫ ДЛЯ СЕТКИ 2x2 */
  /* .products-page .product-card:nth-child(1) {
    border-right: 1px solid #b9b9b9 !important;
    border-bottom: 1px solid #b9b9b9 !important;
  } */

  .products-page .product-card:nth-child(2) {
    border-left: 1px solid #b9b9b9 !important;
    border-bottom: 1px solid #b9b9b9 !important;
    margin-left: -1px !important;
  }

  .products-page .product-card:nth-child(3) {
    border-right: 1px solid #b9b9b9 !important;
    border-top: 1px solid #b9b9b9 !important;
    margin-top: -1px !important;
  }

  .products-page .product-card:nth-child(4) {
    /* border-left: 1px solid #b9b9b9 !important;
    border-top: 1px solid #b9b9b9 !important; */
    /* margin-left: -1px !important; */
    /* margin-top: -1px !important; */
  }

  /* Кнопки навигации */
  .nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    background: white;
    color: #565656;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex !important;
    align-items: center;
    justify-content: center;
    z-index: 100;
    border: 1px solid #e0e0e0; /* Тонкий светло-серый border */
    transition: all 0.3s ease;
  }

  .nav-btn:hover {
    opacity: 1;
    transform: translateY(-50%) scale(1.05); /* Уменьшил scale */
    border-color: #b9b9b9; /* Чуть темнее при наведении */
    background-color: #f8f8f8; /* Легкий фон при наведении */
  }

  .nav-btn.prev {
    left: 0px;
  }

  .nav-btn.next {
    right: 0px;
  }

  .nav-btn.hidden {
    display: none;
  }

  .nav-btn svg {
    width: 30px;
    height: 30px;
    fill: #565656;
  }

  /* Фикс для иконок в карточках */
  .products-page .product-card .favorite-btn {
    right: 10px;
    top: 5px;
  }

  /* Точки индикатора */
  .page-indicator {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
  }

  .page-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ddd;
    cursor: pointer;
    transition: background 0.3s ease;
  }

  .page-dot.active {
    background: var(--accent-color);
  }

  /* Адаптация карточек для мобильных */
  .product-card h3 {
    min-height: 36px;
  }

  .image-container {
    padding-top: 30px;
    height: 180px;
  }

  .products-page .product-card .favorite-btn {
    right: 10px;
    width: 20px;
    height: 20px;
  }

  .product-heart {
    width: 100%;
    height: 100%;
  }

  .product-image {
    max-width: 160px;
    height: 160px;
  }

  .price-and-icons {
    padding-bottom: 20px;
  }

  /* Иконки в карточках */
  .icons img.vector-icon {
    width: 28px;
    height: 21px;
  }

  .icons img.cart-icon {
    width: 38px;
    height: 38px;
  }
  .more-products-button {
    width: clamp(85%, 90%, 95%);
    height: clamp(50px, 60px, 70px);
  }

  .more-products-button-container {
  }
  .more-products-button {
    background-color: white;
    color: #2d2d2d;
    border: 1px solid #cbcbcb;
    border-radius: 4px;
    padding-right: 15px;
    text-align: right;
    height: 36px;
  }
}

@media (max-width: 480px) {
  .price-and-icons {
    padding-right: 5px;
    gap: 0px;
  }

  .favorite-btn {
    width: 17px;
    height: 17px;
  }

  .product-heart {
    width: 100%;
    height: 100%;
  }

  /* Иконки в карточках */
  .icons img.vector-icon {
    width: 23px;
    height: 16px;
  }

  .icons img.cart-icon {
    width: 26px;
    height: 26px;
  }

  .icon-counter {
    height: 14px;
    width: 14px;
    padding: 1px;
    font-size: 9px;
  }

  .notification {
    max-width: 60%;
    right: 5%;
    padding: 10px 14px;
    border-radius: 6px;
    top: 60px;
  }
  .product-image {
    height: 130px;
    max-width: 130px;
  }
}

/* Очень маленькие экраны */
@media (max-width: 390px) {
  .products-page .product-card {
    padding: 8px;
    min-height: 300px;
  }

  .products-page .product-card h3 {
    min-height: 34px;
  }

  .image-container {
    height: 160px;
  }

  .product-image {
    max-width: 120px;
  }
  .price-and-icons {
    padding-right: 5px;
    gap: 0px;
  }

  .product-card .favorite-btn img.product-heart {
    width: 13px;
    height: 13px;
  }

  /* .product-heart {
    width: 100%;
    height: 100%;
  } */

  .products-page .product-card .favorite-btn {
    right: 10px;
    width: 16px;
    height: 16px;
  }

  .product-heart {
    width: 100%;
    height: 100%;
  }

  /* Иконки в карточках */
  .icons img.vector-icon {
    width: 18px;
    height: 13px;
  }

  .icons img.cart-icon {
    width: 24px;
    height: 24px;
  }

  .price-and-icons {
    padding-bottom: 15px;
  }
  .notification {
    padding: 8px 12px;
  }
  .icons {
    gap: 5px;
  }
}

/* ========== ДЕСКТОП И ПЛАНШЕТЫ (769PX И ВЫШЕ) ========== */

@media (min-width: 769px) {
  /* Скрываем навигацию */
  .nav-btn,
  .page-indicator {
    display: none !important;
  }

  /* Логика скрытых продуктов на десктопе */
  .product-card.hidden-product {
    display: none !important;
  }

  body.header-fixed-active .product-card.hidden-product {
    display: flex !important;
  }
}

/* Стили для модального окна входа */
.login-modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 2000;
  justify-content: center;
  align-items: center;
  padding: 20px;
  box-sizing: border-box;
  animation: fadeIn 0.3s ease-out;
}

.login-modal-overlay.show {
  display: flex;
}

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

.login-modal {
  background: white;
  border-radius: 16px;
  width: 100%;
  max-width: 420px;
  position: relative;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
  animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
  from {
    transform: translateY(30px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.login-modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  font-size: 28px;
  color: #999;
  cursor: pointer;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s;
  background: none;
  border: none;
  z-index: 10;
}

.login-modal-close:hover {
  background: #f5f5f5;
  color: #ff4c3f;
}

.login-modal-header {
  text-align: center;
  padding: 40px 40px 30px;
  border-bottom: 1px solid #f0f0f0;
}

.login-modal-header h2 {
  margin: 0 0 8px 0;
  font-size: 28px;
  font-weight: 700;
  color: #333;
}

.login-modal-subtitle {
  margin: 0;
  font-size: 16px;
  color: #666;
}

.login-form {
  padding: 30px 40px 40px;
}

.form-group {
  margin-bottom: 25px;
}

.form-label {
  display: block;
  margin-bottom: 10px;
  font-size: 16px;
  color: #333;
  font-weight: 500;
}

.phone-input-wrapper {
  display: flex;
  align-items: center;
  border: 1px solid #ddd;
  border-radius: 8px;
  overflow: hidden;
  transition: border-color 0.3s;
}

.phone-input-wrapper:focus-within {
  border-color: #ff4c3f;
  box-shadow: 0 0 0 2px rgba(255, 76, 63, 0.1);
}

.phone-prefix {
  padding: 0 15px;
  font-size: 16px;
  color: #333;
  background: #f9f9f9;
  height: 52px;
  display: flex;
  align-items: center;
  border-right: 1px solid #ddd;
  font-weight: 500;
}

.phone-input {
  flex: 1;
  border: none;
  padding: 0 15px;
  font-size: 16px;
  height: 52px;
  outline: none;
  font-family: inherit;
  letter-spacing: 1px;
}

.phone-input::placeholder {
  color: #aaa;
  letter-spacing: normal;
}

.login-submit-btn {
  width: 100%;
  padding: 16px;
  background: #ff4c3f;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  margin-bottom: 25px;
}

.login-submit-btn:hover {
  background: #ff3326;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 76, 63, 0.3);
}

.divider {
  position: relative;
  text-align: center;
  margin: 25px 0;
}

.divider::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: #eee;
}

.divider-text {
  position: relative;
  display: inline-block;
  padding: 0 15px;
  background: white;
  color: #666;
  font-size: 14px;
}

.social-login {
  display: flex;
  gap: 12px;
  margin-bottom: 25px;
}

.social-btn {
  width: 100%;
  padding: 14px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  background: white;
}

.social-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.facebook-btn {
  color: #1877f2;
  border-color: #1877f2;
}

.facebook-btn:hover {
  background: #f0f7ff;
}

.google-btn {
  color: #db4437;
  border-color: #db4437;
}

.google-btn:hover {
  background: #fef2f1;
}

.social-btn-text {
  margin-left: 10px;
}

.register-link {
  text-align: center;
  font-size: 15px;
  color: #666;
}

.register-link-btn {
  color: #ff4c3f;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 15px;
  font-weight: 500;
  margin-left: 5px;
  text-decoration: underline;
  transition: color 0.2s;
}

.register-link-btn:hover {
  color: #ff3326;
}

/* Адаптивность для мобильных */
@media (max-width: 768px) {
  .login-modal {
    max-width: 90%;
    margin: 0 auto;
  }

  .login-modal-header {
    padding: 30px 20px 20px;
  }

  .login-form {
    padding: 20px;
  }

  .login-modal-header h2 {
    font-size: 24px;
  }

  .phone-prefix,
  .phone-input {
    height: 48px;
    font-size: 15px;
  }

  .login-submit-btn {
    padding: 14px;
    font-size: 16px;
  }
}

/* ===== ОБЩИЕ СТИЛИ ДЛЯ КНОПОК КАТАЛОГА ===== */

/* Контейнер для кнопок каталога */
.catalog-button-container {
  display: none; /* По умолчанию скрыты */
  margin: 20px 0;
  width: 100%;
  text-align: center;
  z-index: 10;
  padding: 15px 30px 15px 30px;
}

/* Стили для кнопок каталога (одинаковые для всех) */
.catalog-button-container .catalog-button {
  background-color: var(--accent-color);
  border: none;
  font-family: inherit;
  color: var(--text-color);
  box-sizing: border-box;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 500;
  font-size: 18px;

  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  width: 100%;

  height: 36px;
  padding: 14px 25px;
}

.catalog-button-container .catalog-button:hover {
  background-color: #ff3326;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 76, 63, 0.3);
}

.catalog-button-container .catalog-button img {
  width: 30px;
  height: 30px;
}

/* ===== ОТОБРАЖЕНИЕ НА МОБИЛЬНЫХ (≤1200px) ===== */
@media (max-width: 768px) {
  .catalog-button-container {
    display: flex !important; /* Показываем на мобильных */
    justify-content: center;
  }
  button.catalog-button {
    width: 100%;
  }
}
/* Адаптируем размеры для очень маленьких экранов */
@media (max-width: 480px) {
  .catalog-button-container .catalog-button {
    font-size: 16px;
  }
  .catalog-button-container {
    margin: 10px 0px;
    padding: 15px 25px 15px 25px;
  }
}

/* ===== СКРЫТИЕ НА ДЕСКТОПЕ (>1200px) ===== */
@media (min-width: 769px) {
  .catalog-button-container {
    display: none !important; /* Скрываем на десктопе */
  }
}

/* ===== КОНТЕЙНЕР ДЛЯ ТОВАРОВ ПОДКАТЕГОРИЙ (третий уровень) ===== */
.mobile-category-products-container {
  position: absolute;
  top: 60px;
  left: 0;
  width: 100%;
  height: calc(100% - 60px);
  background: white;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  z-index: 20;
  overflow-y: auto;
  padding: 20px;
  display: none;
}

.mobile-category-products-container.active {
  display: block;
  transform: translateX(0);
}

/* Заголовок "Усі категорії" в подкатегории */
.mobile-category-products-header {
  font-size: 18px;
  font-weight: 600;
  color: #333;
  margin-bottom: 25px;
  padding-bottom: 15px;
  border-bottom: 1px solid #eee;
}

/* Список товаров подкатегории */
.mobile-category-products-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Элемент списка товаров */
.mobile-category-product-item {
  display: block;
  padding: 18px 15px;
  color: #333;
  text-decoration: none;
  font-size: 16px;
  background: #f9f9f9;
  border-radius: 8px;
  border-left: 4px solid var(--accent-color);
  transition: all 0.2s ease;
}

.mobile-category-product-item:hover {
  background: #f0f0f0;
  transform: translateX(5px);
  color: #ff4c3f;
}

/* Для пустых категорий */
.mobile-category-empty {
  text-align: center;
  padding: 40px 20px;
  color: #999;
  font-size: 16px;
}

/* Анимация для перехода между уровнями */
.mobile-catalog-main,
.mobile-subcategories-container,
.mobile-category-products-container {
  transition: transform 0.3s ease;
}

/* Улучшаем видимость активных элементов */
.mobile-subcategory-header.active {
  color: #ff4c3f;
  font-weight: 600;
}

.mobile-subcategory-header.active .mobile-subcategory-arrow {
  color: #ff4c3f;
}

/* ////////////////// */
/* во время рефреша тоже не видно category-list */
/* Полная доступность + безопасность */
body[data-page="orders"] #category-list,
body[data-page="favorites"] #category-list,
body[data-page="profile"] #category-list,
body[data-page="viewed"] #category-list,
body[data-page="korzina"] #category-list,
body[data-page="reviews"] #category-list {
  /* Для скринридеров и доступности */
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;

  /* Дополнительная страховка */
  opacity: 0;
  pointer-events: none;
  z-index: -1000;
}

@media (max-width: 1440px) {
  .advertisement {
    gap: 25px;
  }
  aside {
    margin-right: 10px;
  }
  .advertisement-image-1,
  .advertisement-image-2,
  .advertisement-image-3 {
    max-width: 330px;
  }
  .category-list {
    max-width: 270px;
  }
  body[data-page="home"].header-fixed-active .products {
    grid-template-columns: repeat(4, 1fr);
  }
  /*.products .product-card:nth-child(4n) {
    border-right: none !important;
  }*/
  .products .product-card:nth-child(3n) {
    border-right: none;
  }
  .products .product-card:nth-child(5n) {
    border-right: 1px solid #b9b9b9;
  }
} /* решить проблему с borders */
/* решить проблему с important*/

/* .products--home .product-card:nth-child(4n) {
  border-right: none;
} */
body.header-fixed-active .products--home .product-card:nth-child(4n) {
  border-right: 1px solid #b9b9b9;
}
body.header-fixed-active .products--home .product-card:nth-child(6n) {
  border-right: none;
}

@media (max-width: 1440px) {
  .products--home .product-card:nth-child(3n) {
    border-right: 1px solid #b9b9b9;
  }
  .products--home .product-card:nth-child(4n) {
    border-right: none;
  }
  body.header-fixed-active .products--home .product-card:nth-child(3n) {
    border-right: 1px solid #b9b9b9;
  }
  body.header-fixed-active .products--home .product-card:nth-child(4n) {
    border-right: none;
  }
  body.header-fixed-active .products--home .product-card:nth-child(5n) {
    border-right: 1px solid #b9b9b9;
  }
}

.content-text {
  max-height: 200px;
  overflow: hidden;
  position: relative;
  margin-top: 40px;
}

.content-text.expanded {
  max-height: none;
}

.counter-hidden {
  display: none;
}

.is-invisible {
  display: none;
} /*  класс, который содержит только display:none */
