/* ------------------------------------------------------------------
   Сайт LHMALL: небольшие дополнения к вёрстке старого шаблона.
   Основные стили — /local/templates/lhmall/styles.css (перенос из Битрикса).
   ------------------------------------------------------------------ */

/* --- Шапка: корзина и счётчик ------------------------------------- */
.header-cart {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 14px;
  border-radius: 12px;
  background: #fc8a17;
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  white-space: nowrap;
  transition: background 0.2s ease;
}

.header-cart:hover {
  background: #e67a0d;
  color: #fff;
}

.header-cart__icon {
  display: inline-flex;
  width: 20px;
  height: 20px;
}

.header-cart__count {
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 10px;
  background: #fff;
  color: #fc8a17;
  font-size: 12px;
  line-height: 20px;
  text-align: center;
}

/* --- Поиск: подсказки --------------------------------------------- */
.search-header__window {
  position: absolute;
  z-index: 40;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
  overflow: hidden;
  display: none;
}

.search-header__window.is-open {
  display: block;
}

/* --- Звёзды рейтинга ---------------------------------------------- */
.stars {
  display: inline-flex;
  gap: 2px;
  vertical-align: middle;
}

.star {
  width: 14px;
  height: 14px;
  background: #e0e0e0;
  clip-path: polygon(
    50% 0%,
    61% 35%,
    98% 35%,
    68% 57%,
    79% 91%,
    50% 70%,
    21% 91%,
    32% 57%,
    2% 35%,
    39% 35%
  );
}

.star.is-filled {
  background: #fc8a17;
}

/* --- Плитка категорий --------------------------------------------- */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

.category-tile {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.07);
  color: #242424;
  text-decoration: none;
  font-weight: 700;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.category-tile:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  transform: translateY(-2px);
  color: #fc8a17;
}

.category-tile__count {
  font-size: 13px;
  font-weight: 400;
  color: #9a9a9a;
}

.category-tile__children {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 13px;
  font-weight: 400;
  color: #6d6d6d;
}

.category-tile__children li {
  padding: 2px 0;
}

/* --- Карточка товара в списке: дополнения ------------------------- */
.product__image {
  aspect-ratio: 1;
  object-fit: contain;
  background: #fff;
}

.product__badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 4px 8px;
  border-radius: 8px;
  background: #fc8a17;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}

.product__price-old {
  text-decoration: line-through;
  color: #9a9a9a;
}

/* --- Хлебные крошки ----------------------------------------------- */
.breadcrumbs {
  padding: 16px 0;
}

.breadcrumbs__elements {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 14px;
  color: #7a7a7a;
}

.breadcrumbs__elements li::after {
  content: "/";
  margin-left: 6px;
  color: #c4c4c4;
}

.breadcrumbs__elements li:last-child::after {
  content: "";
}

.breadcrumbs__elements a {
  color: #7a7a7a;
  text-decoration: none;
}

.breadcrumbs__elements a:hover {
  color: #fc8a17;
}

/* --- Категория: тулбар и подкатегории ----------------------------- */
.catalog-tree-sidebar {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 14px;
}

.catalog-tree-sidebar li {
  padding: 0;
  display: block;
}

.catalog-tree-sidebar li::before {
  display: none;
}

.catalog-tree-sidebar__item {
  border-bottom: 1px solid #f0f0f0;
  padding: 8px 0;
}

.catalog-tree-sidebar__link {
  display: block;
  font-weight: 700;
  color: #242424;
  text-decoration: none;
  padding: 4px 0;
}

.catalog-tree-sidebar__link:hover {
  color: #fc8a17;
}

.catalog-tree-sidebar__sub {
  margin: 4px 0 4px 0;
  padding: 0 0 0 12px;
  list-style: none;
  border-left: 2px solid #f3f3f3;
}

.catalog-tree-sidebar__sub li {
  padding: 3px 0;
}

.catalog-tree-sidebar__sub a {
  color: #6d6d6d;
  text-decoration: none;
}

.catalog-tree-sidebar__sub a:hover {
  color: #fc8a17;
}

.catalog-layout {
  display: flex;
  align-items: flex-start;
  gap: 28px;
}

.catalog-content {
  flex: 1;
  min-width: 0;
}

.catalog-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}

.catalog-toolbar__count {
  color: #6d6d6d;
}

.catalog-sort {
  display: flex;
  align-items: center;
  gap: 8px;
}

.catalog-sort select {
  height: 40px;
  padding: 0 12px;
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  background: #fff;
  font: inherit;
}

.category-children {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.category-children a {
  padding: 8px 14px;
  border-radius: 999px;
  background: #f5f5f5;
  color: #242424;
  font-size: 14px;
  text-decoration: none;
}

.category-children a:hover {
  background: #fc8a17;
  color: #fff;
}

/* --- Карточка товара --------------------------------------------- */
.product-page {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 32px;
  margin-bottom: 48px;
}

@media (max-width: 900px) {
  .product-page {
    grid-template-columns: minmax(0, 1fr);
  }
}

.product-gallery__main {
  border-radius: 20px;
  background: #fff;
  overflow: hidden;
}

.product-gallery__main img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
}

.product-gallery__thumbs {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  overflow-x: auto;
}

.product-gallery__thumb {
  flex: 0 0 72px;
  width: 72px;
  height: 72px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
}

.product-gallery__thumb.is-active {
  border-color: #fc8a17;
}

.product-gallery__thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.product-info__title {
  margin: 0 0 12px;
  font-size: 26px;
  line-height: 1.25;
  color: #242424;
}

.product-info__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 16px;
  font-size: 14px;
  color: #7a7a7a;
}

.product-info__price {
  font-size: 34px;
  font-weight: 900;
  color: #242424;
}

.product-info__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
}

.product-info__actions .button,
.product-info__actions button {
  height: 48px;
  padding: 0 28px;
  border: 0;
  border-radius: 12px;
  background: #fc8a17;
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.product-info__chars {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

.product-info__chars th,
.product-info__chars td {
  padding: 10px 12px;
  border-bottom: 1px solid #eee;
  text-align: left;
  vertical-align: top;
}

.product-info__chars th {
  width: 45%;
  font-weight: 600;
  color: #6d6d6d;
}

.reviews-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.review-item {
  padding: 18px 20px;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.06);
}

.review-item__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  font-weight: 700;
}

.review-item__date {
  font-size: 13px;
  font-weight: 400;
  color: #9a9a9a;
}

.product-tabs {
  margin-bottom: 48px;
}

.product-tabs__controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
  border-bottom: 1px solid #eee;
}

.product-tabs__control {
  padding: 12px 18px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: none;
  font: inherit;
  font-weight: 700;
  color: #6d6d6d;
  cursor: pointer;
}

.product-tabs__control.is-active {
  border-color: #fc8a17;
  color: #242424;
}

.product-tabs__panel {
  display: none;
}

.product-tabs__panel.is-active {
  display: block;
}

/* --- Блог --------------------------------------------------------- */
.blog-page {
  padding-bottom: 40px;
}

.blog-page__head {
  margin-bottom: 24px;
}

.blog-page__title {
  margin: 0 0 8px;
  font-family: Gallinari, "Arial Narrow", Impact, system-ui, sans-serif;
  font-size: clamp(32px, 5vw, 64px);
  line-height: 1;
  text-transform: uppercase;
  color: #fe5900;
}

.blog-page__lead {
  margin: 0;
  color: #7a7a7a;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

.blog-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.07);
}

.blog-card__title {
  margin: 0;
  font-size: 18px;
  line-height: 1.3;
}

.blog-card__title a {
  color: #242424;
  text-decoration: none;
}

.blog-card__title a:hover {
  color: #fc8a17;
}

.blog-card__image {
  order: 2;
  border-radius: 14px;
  overflow: hidden;
  background: #f5f5f5;
}

.blog-card__image img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.blog-card__btn {
  order: 1;
  align-self: flex-start;
  padding: 8px 16px;
  border-radius: 10px;
  background: #eeeeee;
  color: #fc8a17;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.blog-card__btn:hover {
  background: #fc8a17;
  color: #fff;
}

.blog-post__cover {
  margin-bottom: 24px;
  border-radius: 20px;
  overflow: hidden;
}

.blog-post__cover img {
  display: block;
  width: 100%;
  max-height: 420px;
  object-fit: cover;
}

.blog-post__body {
  max-width: 840px;
  font-size: 17px;
  line-height: 1.6;
  color: #333;
}

.blog-post__body img {
  max-width: 100%;
  height: auto;
}

.blog-post__meta {
  margin-bottom: 16px;
  color: #9a9a9a;
  font-size: 14px;
}

/* --- Информационные страницы -------------------------------------- */
.page-card {
  padding: 32px;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.06);
  margin-bottom: 40px;
}

.page-card__title {
  margin: 0 0 16px;
  font-size: 32px;
  line-height: 1.2;
}

.page-card__body {
  font-size: 16px;
  line-height: 1.6;
}

.page-card__body img {
  max-width: 100%;
  height: auto;
}

.stub-page {
  padding: 60px 24px;
  text-align: center;
}

.stub-page__title {
  margin: 0 0 12px;
  font-size: 28px;
}

.stub-page__text {
  margin: 0 0 24px;
  color: #7a7a7a;
}

/* --- Пагинация ---------------------------------------------------- */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin: 40px 0 20px;
  flex-wrap: wrap;
  list-style: none;
  padding: 0;
}

.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  background: #fff;
  color: #242424;
  text-decoration: none;
}

.pagination .is-current {
  border-color: #fc8a17;
  background: #fc8a17;
  color: #fff;
}

/* --- Корзина ------------------------------------------------------ */
.cart-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: 20px;
  overflow: hidden;
}

.cart-table th,
.cart-table td {
  padding: 14px 16px;
  border-bottom: 1px solid #f0f0f0;
  text-align: left;
  vertical-align: middle;
}

.cart-table th {
  background: #fafafa;
  font-size: 14px;
  color: #6d6d6d;
}

.cart-table img {
  width: 64px;
  height: 64px;
  object-fit: contain;
}

.cart-total {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  margin: 24px 0;
  font-size: 20px;
}

.cart-total strong {
  font-size: 26px;
}

.cart-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: flex-end;
}

/* --- Блоки главной ------------------------------------------------ */
.home-section {
  margin-bottom: 40px;
}

.home-section__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.home-section__title {
  margin: 0;
  font-size: 26px;
  font-weight: 800;
  color: #242424;
}

.home-section__link {
  color: #fc8a17;
  font-weight: 700;
  text-decoration: none;
}

.banner-slider {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 6px;
  scroll-snap-type: x mandatory;
}

.banner-slider__item {
  flex: 0 0 100%;
  scroll-snap-align: start;
  border-radius: 20px;
  overflow: hidden;
}

@media (min-width: 760px) {
  .banner-slider__item {
    flex-basis: 48%;
  }
}

@media (min-width: 1100px) {
  .banner-slider__item {
    flex-basis: 32%;
  }
}

.banner-slider__item img {
  display: block;
  width: 100%;
  height: auto;
}

.banner-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.banner-row__item {
  flex: 1 1 280px;
  border-radius: 20px;
  overflow: hidden;
}

.banner-row__item img {
  display: block;
  width: 100%;
  height: auto;
}

.text-block__title {
  margin: 0 0 16px;
  color: #ff7e05;
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 800;
}

.text-block__body {
  font-size: 18px;
  line-height: 1.4;
}

.text-block__body p {
  margin: 0 0 1em;
}

/* --- Страница контактов (bitrix:news.detail / contact) ------------ */
.help_section {
  padding: 20px 0 60px;
}

.help_section .big_title h1 {
  margin: 0;
}

.help_section .main_description {
  max-width: 900px;
  margin: 0 auto;
  font-size: 17px;
  line-height: 1.55;
  color: #333;
}

/* --- Ошибки ------------------------------------------------------- */
.error-page {
  padding: 80px 20px;
  text-align: center;
}

.error-page__code {
  font-family: Gallinari, "Arial Narrow", Impact, sans-serif;
  font-size: clamp(64px, 14vw, 160px);
  line-height: 1;
  color: #fc8a17;
}

.error-page__text {
  margin: 12px 0 24px;
  color: #6d6d6d;
}
