/**
 * PDP Related Parts carousel — matches Related Products mockup.
 */

.pdp-related-parts-block {
  margin: 28px 0 12px;
  padding: 0;
}

.pdp-related-parts__title {
  font-size: 1.75rem;
  font-weight: 700;
  color: #1c1a33;
  margin: 0 0 22px;
  line-height: 1.2;
}

.pdp-related-parts__title span {
  color: #e02020;
}

.pdp-related-parts__title::after {
  content: '';
  display: block;
  width: 72px;
  height: 4px;
  margin-top: 10px;
  background: linear-gradient(90deg, #243580 0%, #243580 45%, #e02020 45%, #e02020 100%);
  border-radius: 2px;
}

/* Outer row: arrows live outside the inner card track */
.pdp-related-parts__outer.has-carousel {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-left: -56px;
  margin-right: -56px;
}

.pdp-related-parts__inner {
  flex: 1 1 auto;
  min-width: 0;
  max-width: 100%;
}

.pdp-related-parts__slider.is-static {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}

.pdp-related-parts__slide {
  height: auto;
}

.pdp-related-parts__card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 10px;
  padding: 18px 16px 16px;
  min-height: 100%;
  box-sizing: border-box;
  box-shadow: 0 2px 12px rgba(28, 26, 51, 0.06);
  transition: box-shadow 0.2s ease;
}

.pdp-related-parts__card:hover {
  box-shadow: 0 8px 24px rgba(28, 26, 51, 0.1);
}

.pdp-related-parts__image-link {
  display: block;
  height: 190px;
  margin-bottom: 14px;
  text-align: center;
}

.pdp-related-parts__image-link img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.pdp-related-parts__meta {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
  min-height: 74px;
}

.pdp-related-parts__part-no {
  display: block;
  text-decoration: none;
  line-height: 1.3;
}

.pdp-related-parts__part-label {
  color: #8a8a9a;
  font-size: 0.875rem;
  font-weight: 500;
  margin-right: 4px;
}

.pdp-related-parts__part-value {
  color: #00a8e8;
  font-size: 0.95rem;
  font-weight: 700;
}

.pdp-related-parts__part-no:hover .pdp-related-parts__part-value,
.pdp-related-parts__part-no:focus .pdp-related-parts__part-value {
  text-decoration: underline;
}

.pdp-related-parts__name {
  color: #1c1a33;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.35;
  text-decoration: none;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.pdp-related-parts__name:hover,
.pdp-related-parts__name:focus {
  color: #e02020;
}

.pdp-related-parts__card .pdp-mockup-buy-now.primary-btn {
  margin-top: auto;
  text-decoration: none;
}

.pdp-related-parts__card .pdp-mockup-buy-now.primary-btn:hover,
.pdp-related-parts__card .pdp-mockup-buy-now.primary-btn:focus {
  text-decoration: none;
}

/* Arrows — siblings of inner, in side gutters outside card area */
.pdp-related-parts__arrow {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: #fce8e8;
  color: #e02020;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  font-size: 1.35rem;
  line-height: 1;
  box-shadow: 0 2px 8px rgba(224, 32, 32, 0.12);
  transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
  z-index: 2;
}

.pdp-related-parts__arrow--prev {
  margin-right: 12px;
}

.pdp-related-parts__arrow--next {
  margin-left: 12px;
}

.pdp-related-parts__arrow:hover,
.pdp-related-parts__arrow:focus {
  background: #e02020;
  color: #fff;
  box-shadow: 0 4px 12px rgba(224, 32, 32, 0.25);
}

.pdp-related-parts__arrow.slick-disabled {
  opacity: 0.35;
  cursor: default;
  pointer-events: none;
}

.pdp-related-parts__slider.slick-slider {
  margin: 0;
}

.pdp-related-parts__slider.slick-slider .slick-slide {
  padding: 0 10px;
  box-sizing: border-box;
}

.pdp-related-parts__slider.slick-slider .slick-list {
  margin: 0 -10px;
  overflow: hidden;
}

.pdp-related-parts__slider .slick-arrow {
  display: none !important;
}

@media (max-width: 1199px) {
  .pdp-related-parts__slider.is-static {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .pdp-related-parts__outer.has-carousel {
    margin-left: -44px;
    margin-right: -44px;
  }
}

@media (max-width: 991px) {
  .pdp-related-parts__slider.is-static {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pdp-related-parts__outer.has-carousel {
    margin-left: -36px;
    margin-right: -36px;
  }
}

@media (max-width: 767px) {
  .pdp-related-parts__slider.is-static {
    grid-template-columns: 1fr;
  }

  .pdp-related-parts__outer.has-carousel {
    margin-left: -8px;
    margin-right: -8px;
  }

  .pdp-related-parts__arrow {
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    font-size: 1.15rem;
  }

  .pdp-related-parts__arrow--prev {
    margin-right: 6px;
  }

  .pdp-related-parts__arrow--next {
    margin-left: 6px;
  }
}
