.product-cross-sell {
  --cross-sell-card-image-height: 200px;

  @media (width >= 1024px) {
    --cross-sell-card-image-height: 213px;
  }

  .product-cross-sell__tabs-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 12px;
  }

  .product-cross-sell__tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

  .product-cross-sell__tab {
    position: relative;
    overflow: hidden;
    appearance: none;
    -webkit-appearance: none;
    background-color: transparent;
    border: 1px solid #e6e6e6;
    border-radius: 100px;
    padding: 6px 16px;
    cursor: pointer;
    min-height: 32px;

    @media (width >= 768px) {
      min-height: 28px;
    }

    font-family: Jost;
    font-size: 14px;
    font-weight: 400;
    color: #181818;
    line-height: 100%;
    transition: all 0.3s ease;

    &:hover:after {
      animation: shine 0.75s cubic-bezier(0.01, 0.56, 1, 1);
      background-image: linear-gradient(90deg, transparent, rgba(175, 146, 128, 0.25), transparent);
      content: '';
      height: 100%;
      left: 150%;
      position: absolute;
      top: 0;
      transform: skew(-20deg);
      width: 200%;
    }

    &.is-active {
      background-color: #af9280;
      border-color: #af9280;
      color: #fdfdfc;
    }
  }

  .product-cross-sell__slider-region {
    position: relative;
  }

  .product-cross-sell__navigation--tabs {
    display: none;
    gap: 8px;
    flex-shrink: 0;

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

  .product-cross-sell__navigation--slider {
    display: flex;
    position: absolute;
    top: calc(var(--cross-sell-card-image-height) / 2);
    left: 0;
    width: 100%;
    transform: translateY(-50%);
    justify-content: space-between;
    align-items: center;
    padding: 0 10px;
    pointer-events: none;
    z-index: 10;
    visibility: hidden;
    opacity: 0;
    transition:
      opacity 0.2s ease,
      visibility 0.2s ease;

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

  .product-cross-sell__slider-region.is-nav-visible .product-cross-sell__navigation--slider {
    @media (width < 1024px) {
      visibility: visible;
      opacity: 1;
    }
  }

  .product-cross-sell__tab-content:not(.is-active) .product-cross-sell__navigation--slider {
    visibility: hidden;
    opacity: 0;
  }

  .product-cross-sell__nav-btn {
    display: flex;
    justify-content: center;
    align-items: center;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: opacity 0.2s ease;
    color: #141414;
    flex-shrink: 0;

    &:focus-visible {
      outline: 2px solid #141414;
      outline-offset: 2px;
    }

    &:disabled {
      opacity: 0.4;
      cursor: not-allowed;
      pointer-events: none;
    }
  }

  .product-cross-sell__navigation--tabs .product-cross-sell__nav-btn {
    background-color: #f4f2ec;
    width: 32px;
    height: 32px;
    padding: 8px;
    position: relative;
    pointer-events: auto;

    &:hover {
      background-color: #ebe8e0;
    }

    svg {
      width: auto;
      height: 12px;
      position: absolute;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
    }
  }

  .product-cross-sell__navigation--slider .product-cross-sell__nav-btn {
    background-color: #fdfdfc;
    width: 25px;
    height: 25px;
    padding: 0;
    pointer-events: auto;

    &:hover {
      background-color: #fff;
    }

    svg {
      width: 6px;
      height: 10px;
    }
  }

  .product-cross-sell__contents {
    display: grid;
    grid-template-columns: 100%;
  }

  .product-cross-sell__tab-content {
    grid-area: 1 / 1;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition:
      opacity 0.3s ease,
      visibility 0.3s ease;
    min-width: 0;

    &.is-active {
      opacity: 1;
      visibility: visible;
      pointer-events: auto;
      z-index: 1;
    }
  }

  .product-cross-sell__description {
    font-family: Jost;
    font-weight: 400;
    font-size: 14px;
    line-height: 1.2;
    letter-spacing: 0.02em;
    vertical-align: middle;
    margin-bottom: 16px;

    p {
      margin: 0;
    }
  }

  .product-cross-sell__slider {
    &.flickity-viewport-off {
      display: flex;
      gap: 12px;
      overflow-x: auto;
      scroll-snap-type: x mandatory;

      scrollbar-width: none;
      -ms-overflow-style: none;

      &::-webkit-scrollbar {
        display: none;
      }
    }
  }

  .product-cross-sell__slide {
    display: flex;
    align-items: stretch;
    width: 174px;
    flex-shrink: 0;
    margin-right: 12px;

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

    &:last-child {
      margin-right: 0;
    }

    .cross-sell-card {
      margin-bottom: 0;
    }
  }

  .cross-sell-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    height: auto;

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

    .cross-sell-card__image {
      width: 100%;
      height: var(--cross-sell-card-image-height);

      img {
        width: 100%;
        height: 100%;
        object-fit: cover;
      }
    }

    .cross-sell-card__info {
      display: flex;
      flex-direction: column;
      height: 100%;
      gap: 4px;
    }

    .cross-sell-card__title {
      display: block;
      font-family: Jost;
      font-weight: 400;
      font-size: 16px;
      line-height: 125%;
      letter-spacing: 0.02em;
      margin-bottom: 4px;

      .nw-dimensions {
        margin-top: 6px;
      }

      .nw-dimensions,
      .nw-dimensions * {
        font-family: Jost;
        font-weight: 400;
        font-size: 14px;
        line-height: 125%;
        letter-spacing: 0.02em;
        color: #5A5A53 !important;
      }
    }

    .cross-sell-card__price {
      font-family: Jost;
      font-weight: 500;
      font-size: 16px;
      line-height: 100%;
      letter-spacing: 1px;
      margin: auto 0 0 0;
    }
  }
}
