/* Breadcrumb */
.breadcrumb-wrapper {
  background: var(--gradients-accent-section-bg-1);
  padding: 0 var(--container-margin);
}

.clp .breadcrumb-wrapper {
  background: unset;
}

.breadcrumb-nav__plp,
.breadcrumb-nav__search {
  padding: var(--sizing-s) var(--container-margin);

  @media (width >= 768px) {
    padding-top: var(--sizing-m);
    padding-bottom: var(--sizing-m);
  }
}

.breadcrumbs__count-bar {
  padding-top: 0;

  .breadcrumbs__title-wrapper {
    h1,
    h2,
    h3,
    h4,
    h5,
    h6 {
      font-size: var(--fs-medium);
      font-weight: var(--fw-500);
      line-height: 1.92rem;
      display: inline;
      align-items: flex-start;
      gap: var(--sizing-2xs);

      @media (width >= 768px) and (width < 1024px) {
        font-size: var(--fs-large);
        line-height: var(--lh-large);
        gap: var(--sizing-xs);
      }

      @media (width >= 1024px) {
        font-size: var(--fs-28);
        line-height: 3.4rem;
        gap: var(--sizing-s);
      }
    }

    .breadcrumbs__count {
      display: inline;
      white-space: nowrap;
      margin-left: var(--sizing-2xs);

      @media (width >= 768px) and (width < 1024px) {
        margin-left: var(--sizing-xs);
      }

      @media (width >= 1024px) {
        margin-left: var(--sizing-s);
      }
    }
  }

  .breadcrumbs__total-count,
  .breadcrumbs__items-text {
    font-size: var(--fs-small);
    font-weight: var(--fw-400);
    line-height: 1.68rem;
    color: var(--neutrals-sub-texts-paragraphs);

    @media (width>=768px) and (width < 1024px) {
      font-size: var(--fs-medium);
      line-height: 1.92rem;
    }

    @media (width>=1024px) {
      font-size: var(--fs-large);
      line-height: var(--lh-large);
    }
  }
}

.plp .breadcrumbs__count-bar,
.search .breadcrumbs__count-bar {
  display: flex;
  flex-flow: row wrap;
  align-items: baseline;
  gap: var(--sizing-xs);

  .breadcrumbs__category-short-description {
    width: 100%;
    flex-basis: 100%;
    font-size: var(--fs-xsmall);
    font-weight: var(--fw-400);
    line-height: var(--lh-small);
    color: var(--neutrals-sub-texts-grey);

    @media (width >= 768px) {
      line-height: var(--lh-medium);
    }

    button{
      padding:0 0 0 var(--spacing-12);
    }

    &.expanded button {
      padding: 0 0 0 var(--sizing-2xs);
    }

    /* Show ellipsis when text is truncated not expanded */
    &:not(.expanded) p {
      position: relative;
      display: inline;

      button::before {
        content: '...';
        color: var(--neutrals-sub-texts-grey);
        position: absolute;
        left: 0;
        padding-right: 4px;
      }
    }

    .read-more-button-text {
      text-decoration: none;
      font-size: var(--fs-xsmall);
      font-weight: var(--fw-500);
      padding-top: 0;
      padding-bottom: 0;

      &:hover {
        color: var(--primary-variations-primary);
      }
    }
  }

  @media (width>=1024px) {
    .breadcrumbs__category-short-description {
      font-size: var(--fs-small);
      font-weight: var(--fw-400);
      color: var(--neutrals-sub-texts-grey);

      .read-more-button-text {
        font-size: var(--fs-small);
      }
    }
  }
}

.breadcrumbs {
  --separator-size: 16px;
  --gap: 6px;

  background: var(--bg-color);
  display: flex;
  flex-wrap: wrap;
  padding: var(--sizing-xs) 0;
  row-gap: 6px;

  .breadcrumbs__item {
    display: flex;
    align-items: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;

    .breadcrumbs__link {
      color: var(--primary-variations-primary);
      font: var(--text-small-light);
      font-weight: var(--fw-400);
      line-height: var(--lh-16);

      @media (width>=1024px) {
        line-height: var(--lh-small);
      }
    }

    &:not(:last-child) {
      &::after {
        content: '';
        display: flex;
        background: url('/genuine-accessories/icons/arrow-left.svg') no-repeat center center;
        margin: 0 var(--gap);
        width: var(--separator-size);
        height: var(--separator-size);
      }
    }

    &:last-child {
      .breadcrumbs__link {
        word-break: keep-all;
        white-space: nowrap;
        color: var(--neutrals-headings);
        font-weight: var(--fw-600);
        line-height: var(--lh-16);

        @media (width>=1024px) {
          font-weight: var(--fw-500);
          line-height: var(--lh-small);
        }
      }
    }
  }

  @media screen and (width >= 1024px) {
    --separator-size: 16px;
    --gap: 6px;
    --bg-color: none;
  }
}

.plp .breadcrumbs,
.search .breadcrumbs {
  padding: 0 0 var(--sizing-xs) 0;
}

.breadcrumb-nav__profile {
  .breadcrumb-nav {
    @media (width >= 768px) {
      position: absolute;
      width: calc(100% - 236px - 24px);
    }
  }
}

.breadcrumb-profile-section {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-top: 6px;
  gap: var(--sizing-xl);
  padding-bottom: var(--sizing-s);

  @media (width >= 768px) {
    margin-top: 0;
    padding: var(--sizing-m) 0;
  }

  .breadcrumb-car-image img {
    width: 130px;

    @media (width >= 768px) {
      width: 236px;
    }

    @media (width >= 1024px) {
      width: 308px;
    }
  }

  .breadcrumb-user-greeting {
    color: var(--primary-color);
    font-size: var(--fs-large);
    font-weight: var(--fw-700);
    line-height: var(--lh-large);

    @media (width >= 768px) {
      font-size: var(--fs-xslarge);
      line-height: var(--lh-xxxlarge);
      padding-top: var(--sizing-xl);
    }

    @media (width >= 1024px) {
      font-size: var(--fs-28);
    }
  }
}
