/* Исправление: кнопка "читать далее" улетает при наведении на article-preview */
/* Делаем контент всегда видимым, убираем transform на desktop */

@media (min-width: 992px) {
  .article-preview__content {
    position: relative !important;
    transform: none !important;
    border-top: solid 1px #d6d6d6 !important;
  }
  
  .article-preview:hover .article-preview__content,
  .article-preview:focus .article-preview__content {
    transform: none !important;
  }
}

/* Стили для кликабельного заголовка */
.article-preview__heading a {
  color: inherit;
  text-decoration: none;
  transition: color 0.3s ease;
}

.article-preview__heading a:hover,
.article-preview__heading a:focus {
  color: #ff4800;
  text-decoration: none;
}

/* Исправление: кнопка "все товары" на странице товара вызывает горизонтальную прокрутку */
.related-products-section__header {
  width: 100%;
  overflow-x: hidden;
  margin-bottom: 30px;
}

.related-products-section__header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  width: 100%;
  max-width: 100%;
  padding: 0 15px;
  box-sizing: border-box;
}

.related-products-section__header .heading {
  margin: 0;
  flex: 1 1 100%;
  min-width: 0;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.related-products-section__link {
  flex: 0 0 auto;
  white-space: nowrap;
  text-decoration: none;
  color: #ff4800;
  font-weight: 500;
  transition: color 0.3s ease;
}

.related-products-section__link:hover,
.related-products-section__link:focus {
  color: #ff6600;
  text-decoration: underline;
}

/* На мобильных кнопка под заголовком */
@media (max-width: 767px) {
  .related-products-section__header-inner {
    flex-direction: column;
    align-items: flex-start;
    padding: 0;
  }
  
  .related-products-section__header .heading {
    flex: 1 1 100%;
    width: 100%;
    margin-bottom: 10px;
  }
  
  .related-products-section__link {
    align-self: flex-start;
  }
  
  .related-products-section {
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
  }
  
  .related-products-section .container {
    padding-left: 15px;
    padding-right: 15px;
    max-width: 100%;
    overflow-x: hidden;
  }
}

/* Убираем горизонтальную прокрутку на всех устройствах */
body {
  overflow-x: hidden;
  max-width: 100vw;
}

html {
  overflow-x: hidden;
  max-width: 100vw;
}

/* Исправление: страница товара не должна вызывать горизонтальную прокрутку */
@media (max-width: 767px) {
  .single-project--with-sidebar {
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
  }
  
  .single-project--with-sidebar .container-fluid {
    padding-left: 0;
    padding-right: 0;
    max-width: 100%;
    overflow-x: hidden;
  }
  
  .single-project--with-sidebar .row {
    margin-left: 0;
    margin-right: 0;
    max-width: 100%;
    overflow-x: hidden;
  }
  
  .single-project__aside,
  .single-project__content {
    padding-left: 15px;
    padding-right: 15px;
    max-width: 100%;
    overflow-x: hidden;
  }
  
  .shop-product-content img {
    max-width: 100%;
    height: auto;
    display: block;
  }
}
