/**
 * Page «Каталог запчастей» — accordion sections + subcategory swiper cards.
 * Figma cards: 248×200, radius 8px, padding 16px, gap 16px; nav arrows 42×42.
 */

.c-catalog-parts-page__top-filters {
  display: none;
}

.c-catalog-parts-page__top-sorting {
  display: none;
}

@media (max-width: 1024px) {
  .c-catalog-parts-page__top-filters {
    display: block;
    margin-bottom: 16px;
  }
}

.c-catalog-parts--page {
  margin: clamp(16px, 2vw, 24px) 0 clamp(32px, 4vw, 48px);
  --cmp-content-max: none;
}

.c-catalog-parts-page__banner {
  display: block;
  width: 100%;
  height: 182px;
  margin-bottom: 40px;
  overflow: hidden;
  border-radius: 8px;
  text-decoration: none;
  color: inherit;
}

@media (max-width: 1024px) {
  .c-catalog-parts-page__banner {
    margin-bottom: 24px;
  }
}

.c-catalog-parts-page__banner-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.c-catalog-parts-page__manager .customFormmanager {
  --customFormmanagerPdTop: 32px;
  --customFormmanagerPdBottom: 48px;
}

@media (max-width: 650px) {
  .c-catalog-parts-page__banner {
    display: none;
  }

  .c-catalog-parts--page .c-catalog-parts__menu {
    gap: 24px;
  }
}

.c-catalog-parts--page .c-catalog-parts__menu {
  max-width: none;
  gap: 32px;
}
@media (max-width: 450px){
  .c-catalog-parts--page .c-catalog-parts__menu {
    max-width: none;
    gap: 24px;
  }
}

.c-catalog-parts--page section.c-catalog-parts__section {
  gap: 16px;
  grid-template-columns: minmax(0, 1fr);
  border: 0;
  border-radius: 0;
  background: transparent;
}

.c-catalog-parts--page .c-catalog-parts__section-head {
  align-items: flex-start;
  gap: 12px;
  padding: 12px 16px;
  border: 1px solid #e8e8e8;
  border-radius: 8px;
  background: #ffffff;
}

.c-catalog-parts--page .c-catalog-parts__section--expandable.c-catalog-parts__section--is-open .c-catalog-parts__section-head {
  background: #deeaf4;
  border-color: #e8e8e8;
}

.c-catalog-parts--page .c-catalog-parts__section--expandable .c-catalog-parts__section-head {
  background: #ffffff;
}

.c-catalog-parts--page .c-catalog-parts__section-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.c-catalog-parts--page .c-catalog-parts-page__section-title,
.c-catalog-parts--page .c-catalog-parts__section-title {
  margin: 0;
  font-size: 24px;
  line-height: 32px;
  font-weight: 700;
  color: #59667d;
}

.c-catalog-parts--page .c-catalog-parts__section-link {
  display: inline-block;
  text-decoration: none;
  color: rgba(16, 24, 40, 1);
}

.c-catalog-parts--page .c-catalog-parts__section--expandable.c-catalog-parts__section--is-open .c-catalog-parts-page__section-title,
.c-catalog-parts--page .c-catalog-parts__section--expandable.c-catalog-parts__section--is-open .c-catalog-parts__section-title {
  color: #0067b0;
}

@media (hover: hover) and (pointer: fine) {
  .c-catalog-parts--page .c-catalog-parts__section--expandable .c-catalog-parts__section-head:hover,
  .c-catalog-parts--page .c-catalog-parts__section--expandable.c-catalog-parts__section--is-open .c-catalog-parts__section-head:hover {
    background: linear-gradient(90deg, #0067b0 0%, #2d77f4 100%);
    border-color: transparent;
  }

  .c-catalog-parts--page .c-catalog-parts__section--expandable .c-catalog-parts__section-head:hover .c-catalog-parts-page__section-title,
  .c-catalog-parts--page .c-catalog-parts__section--expandable .c-catalog-parts__section-head:hover .c-catalog-parts__section-title,
  .c-catalog-parts--page .c-catalog-parts__section--expandable.c-catalog-parts__section--is-open .c-catalog-parts__section-head:hover .c-catalog-parts-page__section-title,
  .c-catalog-parts--page .c-catalog-parts__section--expandable.c-catalog-parts__section--is-open .c-catalog-parts__section-head:hover .c-catalog-parts__section-title,
  .c-catalog-parts--page .c-catalog-parts__section--expandable .c-catalog-parts__section-head:hover .c-catalog-parts-page__section-lead {
    color: #ffffff;
  }
}

.c-catalog-parts--page .c-catalog-parts-page__section-lead {
  margin: 0;
  font-size: 14px;
  line-height: 20px;
  font-weight: 400;
  color: #101828;
}

.c-catalog-parts--page .c-catalog-parts__toggle {
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
}

.c-catalog-parts--page .c-catalog-parts__toggle-icon {
  width: 32px;
  height: 32px;
  background: #f8f8f8;
  border-radius: 5px;
}

.c-catalog-parts--page .c-catalog-parts__section--expandable .c-catalog-parts__section-title {
  color: #101828;
}

.c-catalog-parts-page__panel {
  padding: 0;
  background: transparent;
}

@media (max-width: 1024px) {
  .c-catalog-parts--page .c-catalog-parts-page__section-title,
  .c-catalog-parts--page .c-catalog-parts__section-title {
    font-size: 22px;
    line-height: 32px;
  }
  .c-catalog-parts-page__section-lead{
    font-size: 14px;
    line-height: 20px;
  }
}
@media (max-width: 450px) {
  .c-catalog-parts--page .c-catalog-parts-page__section-title,
  .c-catalog-parts--page .c-catalog-parts__section-title {
    font-size: 14px;
    line-height: 20px;
  }
  .c-catalog-parts-page__section-lead{
    font-size: 12px;
    line-height: 16px;
  }
  .c-catalog-parts--page .c-catalog-parts__toggle,
  .c-catalog-parts--page .c-catalog-parts__toggle-icon{
    width:20px;
    height:20px;
    flex: 0 0 20px;
  }
}

@media (max-width: 650px) {
  .c-catalog-parts--page .c-catalog-parts__section-head {
    padding: 8px 12px;
  }
}

.c-catalog-parts-page__grid {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.c-catalog-parts-page__grid-item {
  width: 248px;
  max-width: 100%;
}

.c-catalog-parts-page__slider {
  position: relative;
}

.c-catalog-parts-page__swiper {
  overflow: hidden;
}

.c-catalog-parts-page__slide {
  width: 248px;
  height: auto;
}

.c-catalog-parts-page__card {
  display: grid;
  grid-template-rows: auto 1fr;
  align-content: start;
  gap: 5px;
  width: 100%;
  height: 200px;
  padding: 16px;
  border-radius: 8px;
  background: #fff;
  color: inherit;
  box-sizing: border-box;
  transition: box-shadow 0.2s ease;
}

@media (hover: hover) and (pointer: fine) {
  .c-catalog-parts-page__card:hover {
    box-shadow: 0 4px 16px rgba(16, 24, 40, 0.08);
    border: 1px solid rgba(0, 103, 176, 1);
  }

  .c-catalog-parts-page__card-title:hover {
    color: var(--color-blue-new, #0067b0);
  }
}

.c-catalog-parts-page__card-head {
  display: flex;
  align-items: flex-start;
  gap: 4px;
  min-width: 0;
}

.c-catalog-parts-page__card-title {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 14px;
  line-height: 1.3;
  font-weight: 500;
  color: var(--color-black, #101828);
  text-decoration: none;
}

.c-catalog-parts-page__card-info {
  flex: 0 0 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

@media (hover: hover) and (pointer: fine) {
  .c-catalog-parts-page__card-info:hover {
    opacity: 0.85;
  }
}

.c-catalog-parts-page__card-info svg {
  display: block;
}

.c-catalog-parts-page__tooltip {
  display: flex;
  align-items: flex-start;
  gap: 4px;
  width: 216px;
}

.c-catalog-parts-page__tooltip-text {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 12px;
  line-height: 16px;
  font-weight: 500;
  color: #101828;
}

.c-catalog-parts-page__tooltip-text p {
  margin: 0 0 8px;
}

.c-catalog-parts-page__tooltip-text p:last-child {
  margin-bottom: 0;
}

.c-catalog-parts-page__tooltip-close {
  flex: 0 0 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 2px;
  background: transparent;
  color: #637088;
  cursor: pointer;
  transition: color 0.2s ease;
}

@media (hover: hover) and (pointer: fine) {
  .c-catalog-parts-page__tooltip-close:hover {
    color: #101828;
  }
}

.tippy-box[data-theme~='catalog-parts'] {
  height: auto;
  min-height: 0;
  border-radius: 5px;
  background-color: #e8e8e8;
  box-shadow: 0 2px 12px rgba(207, 215, 231, 0.5);
  color: #101828;
}

.tippy-box[data-theme~='catalog-parts'] .tippy-content {
  padding: 12px;
}

.tippy-box[data-theme~='catalog-parts'] > .tippy-arrow {
  display: none;
}

@media screen and (max-width: 1280px) {
  .tippy-box[data-theme~='catalog-parts'] {
    display: block;
  }
}

.c-catalog-parts-page__card-media {
  display: flex;
  align-items: flex-end;
  min-height: 0;
  text-decoration: none;
}

.c-catalog-parts-page__card-image {
  display: block;
  width: 100%;
  height: auto;
  max-height: 108px;
  object-fit: contain;
  border-radius: 4px;
}

.c-catalog-parts-page__nav {
  position: absolute;
  top: 50%;
  right: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transform: translateY(-50%);
  width: 100%;
}
.c-catalog-parts-page__nav-btn--next {
  position: absolute;
  right: -21px;
  top: -21px;
}
.c-catalog-parts-page__nav-btn--prev {
  position: absolute;
  left: -21px;
  top: -21px;
}

.c-catalog-parts-page__nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(194, 198, 206, 0.3);
  color: #101828;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, opacity 0.2s ease;
}

@media (hover: hover) and (pointer: fine) {
  .c-catalog-parts-page__nav-btn:hover:not(.swiper-button-disabled) {
    background: rgba(194, 198, 206, 0.55);
    color: var(--color-blue-new, #0067b0);
  }
}

.c-catalog-parts-page__nav-btn.swiper-button-disabled {
  opacity: 0.35;
  cursor: default;
}

.c-catalog-parts-page__nav-btn svg {
  display: block;
}

@media (max-width: 1024px) {
  .c-catalog-parts-page__slide,
  .c-catalog-parts-page__grid-item {
    width: 220px;
  }

  .c-catalog-parts-page__card {
    height: 184px;
    padding: 14px;
  }

  .c-catalog-parts-page__card-image {
    max-height: 96px;
  }
}

@media (max-width: 650px) {
  .c-catalog-parts-page__slider {
    padding-right: 0;
  }

  .c-catalog-parts-page__nav {
    display: none;
  }

  .c-catalog-parts-page__panel--slider .c-catalog-parts-page__swiper {
    overflow: visible;
  }

  .c-catalog-parts-page__panel--slider .swiper-wrapper {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    transform: none !important;
  }

  .c-catalog-parts-page__panel--slider .c-catalog-parts-page__slide {
    width: auto !important;
    margin: 0 !important;
  }

  .c-catalog-parts-page__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 16px;
  }

  .c-catalog-parts-page__slide,
  .c-catalog-parts-page__grid-item {
    width: auto;
  }

  .c-catalog-parts-page__card {
    height: auto;
    min-height: 72px;
    grid-template-rows: auto;
    padding: 12px;
  }

  .c-catalog-parts-page__card-media {
    display: none;
  }
}
