/* ============================================
   CATALOG PAGE STYLES
   ============================================ */

.catalog-page {
  padding-top: 100px; /* Header height + spacing */
  padding-bottom: 80px;
  background-color: var(--color-bg);
}

.catalog-page__container {
  display: flex;
  padding-bottom: 60px;
  gap: 40px;
  align-items: flex-start;
}

/* --- SIDEBAR --- */
.catalog-sidebar {
  position: relative;
  overflow: visible;
  width: 300px;
  flex-shrink: 0;
  position: sticky;
  top: 165px; /* Sticky below header */
  padding: 0;
  background: #e9e9e900;
}

.catalog-nav {
  min-height: 550px;
}

/* Декоративный элемент, выходящий за левую границу */
.catalog-nav__decor--left {
  position: absolute;
  top: -87px;
  right: auto;
  bottom: auto;
  left: -93%; /* Отступ влево за границу родителя */
  z-index: -1;
  pointer-events: none; /* Чтобы элемент не мешал кликам по меню */
}

/* Изображение внутри декоративного элемента */
.catalog-nav__decor-img--left {
  display: block;
  max-width: none;
  width: auto;
  height: auto;
}

.catalog-nav__list {
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 5px;
}

/* ============================================
   ВЕРТИКАЛЬНАЯ ПОЛОСКА ДЛЯ ОСНОВНОГО ПУНКТА МЕНЮ
   ============================================ */

/* Основной пункт меню с подменю */
.catalog-nav__item--has-children {
  position: relative;
  margin-bottom: 5px;
}

/* Вертикальная полоска через псевдоэлемент */
.catalog-nav__item--has-children > .catalog-nav__link::before {
  content: "";
  position: absolute;
  left: -10px;
  top: 0;
  bottom: 0;
  width: 5px;
  background: #C4CACC;
}

/* Hover - меняем цвет полоски */
.catalog-nav__item--has-children:hover > .catalog-nav__link::before {
  background-color: var(--color-link-dark-green);
}

/* Активный пункт - цвет полоски */
.catalog-nav__item--has-children > .catalog-nav__link.active::before {
  background-color: var(--color-link-dark-green);
}

/* Отступ слева для текста */
.catalog-nav__item--has-children > .catalog-nav__link {
  position: relative;
  margin-left: 10px;
}

.catalog-nav__link {
  display: block;
  padding: 20px 25px;
  font-family: "PF BeauSans Pro", var(--font-sans);
  font-weight: 600;
  font-size: 14px;
  line-height: 1.2;
  text-transform: uppercase;
  color: #262626;
  text-align: left;
  transition: background-color 0.2s, color 0.2s;
  margin-left: 5px;
  border-bottom: 1px solid #e0d0df;
}

.catalog-nav__link:hover {
  border-bottom: 2px solid #adadad;
}

.catalog-nav__link.active {
  background-color: var(--color-link-dark-green);
  color: white;
}

.catalog-sidebar__actions {
  padding: 30px 0;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.catalog-sidebar__btn {
  width: 100%;
  min-height: 48px;
  font-size: 14px;
  justify-content: space-between;
  padding: 0 15px;
  gap: 10px;
}

/* ============================================
   РАСКРЫВАЮЩЕЕСЯ МЕНЮ 
   ============================================ */

/* Пункты меню с подменю */
.catalog-nav__item--has-children {
  position: relative;
}

/* Стрелка для пунктов с подменю */
.catalog-nav__item--has-children > .catalog-nav__link {
  position: relative;
  padding-right: 40px;
}

/* Подменю */
.catalog-nav__submenu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: none;
  overflow: hidden;
}

/* Открытое подменю */
.catalog-nav__item--has-children.open .catalog-nav__submenu {
  display: block;
  animation: slideDown 0.3s ease;
}

/* Элементы подменю */
.catalog-nav__subitem {}

/* Ссылки подменю */
.catalog-nav__sublink {
  display: block;
  margin-left: 16px;
  padding: 6px 6px 6px 10px;
  font-family: "PF BeauSans Pro", var(--font-sans);
  text-align: left;
  text-decoration: none;
  border-bottom: 1px solid #e0d0df;
  transition: all 0.2s;
  font-style: normal;
  font-weight: 500;
  font-size: 16px;
  line-height: 19px;
  color: #666666;
}

.catalog-nav__sublink:hover {
  text-decoration: underline;
}

/* Анимация появления */
@keyframes slideDown {
  from {
    opacity: 0;
    max-height: 0;
  }
  to {
    opacity: 1;
    max-height: 300px;
  }
}

/* Активный пункт подменю */
.catalog-nav__sublink.active {
  color: var(--color-link-dark-green);
  font-weight: 600;
}

.catalog-sidebar__btn-icon {
  font-size: 18px;
}

/* --- CONTENT AREA --- */
.catalog-content {
  flex-grow: 1;
  width: 100%;
}

/* Breadcrumbs */
.breadcrumbs {
  margin-bottom: 30px;
  font-size: 14px;
  color: #666;
  display: flex;
  flex-wrap: wrap;
}

.breadcrumbs__link {
  color: #888;
  transition: color 0.2s;
}

.breadcrumbs__link:hover {
  color: var(--color-primary);
}

.breadcrumbs__separator {
  margin: 0 5px;
  color: #ccc;
}

.breadcrumbs__current {
  color: #aaa;
}

/* Title */
.catalog-title {
  font-family: "PF BeauSans Pro", var(--font-sans);
  font-weight: 600;
  font-size: 24px;
  line-height: 1.1;
  text-transform: uppercase;
  color: var(--color-primary);
  margin: 0 0 40px;
  padding-bottom: 20px;
  border-bottom: 1px solid #eee;
  -webkit-text-stroke: 0px black;
  text-shadow: none;
}

/* Category List */
.category-list {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.category-item {
  display: flex;
  border-bottom: 1px solid #eee;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}

.category-item:hover {
  background: #f8f8f8;
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
}

.category-item__media {
  width: 50%;
  flex-shrink: 0;
  background: white;
  border-right: 1px solid #eee;
}

.category-item__img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.category-item__body {
  flex-grow: 1;
  padding: 30px;
  display: flex;
  flex-direction: column;
}

.category-item__title {
  margin: 0 0 15px;
  font-family: "PF BeauSans Pro", var(--font-sans);
  font-weight: 600;
  font-size: 20px;
  line-height: 1.2;
  text-transform: uppercase;
  color: #111;
}

.category-item:hover .category-item__title {
  color: var(--color-link-dark-green);
}

.category-item__text {
  margin: 0 0 25px;
  font-size: 15px;
  line-height: 1.6;
  color: #555;
  flex-grow: 1;
}

.category-item__footer {
  margin-top: auto;
  text-align: right;
}

.button-outlined {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 25px;
  border: 1px solid var(--color-link-dark-green);
  color: white;
  font-family: inherit;
  font-weight: 600;
  text-transform: none;
  background: var(--color-link-dark-green);
  cursor: pointer;
  transition: all 0.2s;
}

.button-outlined:hover {
  border: 1px solid #358393;
  background: white;
  color: #358393;
}

.products__cta-row-category {
  justify-content: space-around;
  display: none;
}

/* ============================================
   SEO
   ============================================ */
.seo {
  position: relative;
  padding: 48px 0 40px;
  background: linear-gradient(360deg, #FFFFFF 0%, #D9D9D9 100%);
}

.seo__container {
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
  z-index: 3;
}

.seo__lead {
  margin: 0;
  font-size: 24px;
  line-height: 1.13;
  color: #93178b;
}

.seo__text {
  margin: 0;
  font-size: 16px;
  line-height: 1.6;
  color: #262626;
}

.seo__decor--left {
  position: absolute;
  top: 50px;
  right: 20px;
}

@media (max-width: 1382px) {
  .catalog-page__container {
    gap: 25px;
  }

  .category-item {
    align-items: flex-end;
  }
}

@media (max-width: 1308px) {
  .catalog-page__container {
    gap: 25px;
  }

  .category-item {
    align-items: flex-end;
  }

  .category-item__title {
    font-size: 16px;
  }

  .category-item__body {
    padding: 0 10px 10px 15px;
  }

  .catalog-sidebar {
    width: 275px;
  }

  .catalog-nav__decor--left {
    left: -110%;
  }
}

@media (max-width: 1185px) {
  .category-item__text {
    margin: 0px 0 0px;
  }
}

@media (max-width: 1115px) {
  .catalog-sidebar {
    display: none;
  }

  .category-item__text {
    margin: 0px 0 25px;
  }

  .category-item__body {
    padding: 30px;
  }

  .products__cta-row-category {
    display: flex;
    flex-wrap: wrap;
    margin-top: 50px;
  }
}

@media (max-width: 1026px) {
  .category-item__body {
    padding: 0 10px 10px 15px;
  }
}

@media (max-width: 1020px) {
  .catalog-page {
    padding-top: 10px;
  }
}

@media (max-width: 902px) {
  .category-item__media {
    width: 50%;
    height: 218px;
  }

  .category-item__img {
    object-fit: cover;
  }

  .category-item__text {
    margin: 0px 0 16px;
  }
}

/* --- RESPONSIVENESS --- */
@media (max-width: 767px) {
  .catalog-page__container {
    flex-direction: column;
  }

  .catalog-title {
    margin: 0 0 15px;
    text-align: center;
  }

  .catalog-sidebar {
    display: none;
  }

  .category-item {
    flex-direction: column;
    gap: 30px;
  }

  .category-item__media {
    width: 100%;
    height: 250px;
  }

  .category-item__title {
    text-align: center;
  }

  .category-item__footer {
    text-align: center;
  }
}

@media (max-width: 580px) {
  .category-item__media {
    height: 227px;
  }
}

@media (max-width: 511px) {
  .category-item__media {
    height: 172px;
  }
}

@media (max-width: 450px) {
  .catalog-page {
    padding-top: 10px;
  }

  .catalog-title {
    font-size: 16px;
  }

  .category-item__body {
    align-items: center;
    gap: 13px;
  }

  .seo__lead {
    font-size: 20px;
  }

  .seo__text {
    font-size: 16px;
  }
}