.unitsandaccessories-container {
  position: relative;
  padding: 40px;
  padding-right: 0;
  font-family: Archivo;

  @media (max-width: 650px) {
    padding: 0;
  }

  >.cmp-container {
    display: flex;
    flex-direction: column;
    gap: 35px;

    /* > :last-child {
      margin-right: 20px;
    } */

    @media screen and (max-width:650px) {
      gap: 20px;
    }

    .text {
      .cmp-text{
        display: flex;
        flex-direction: column;
        gap: 13px;
        @media screen and (max-width:767px){
            gap: 5px;
            align-items: center;
          }
      }
      h2{
        font-size: 32px;
        font-weight: 500;
        color: #232426;
        margin: 0;
        line-height: 101%;
  
        @media (max-width: 650px) {
          font-size: 24px;
          text-align: center;
        }
      }
      p{
        font-size: 18px;
        font-weight: 300;
        color: #323232;
        @media screen and (max-width:767px){
          font-size: 14px;
          text-align: center;
        }
      }
    }

    .tabs {
      .cmp-tabs {
        display: flex;
        gap: 30px;

        @media (max-width: 650px) {
          flex-direction: column;
          padding: 0 20px;
          padding-right: 0;
          row-gap: 18px;
        }

        .cmp-tabs__tablist {
          margin: 0;
          width: 20%;
          display: flex;
          flex-direction: column;

          @media (max-width: 650px) {
            display: flex;
            justify-content: flex-start;
            width: 100%;
            gap: 10px;
            overflow-x: scroll;
            padding-right: 20px;
            flex-direction: row;
            flex-wrap: nowrap;
          }

          .cmp-tabs__tab {
            font-size: 18px;
            font-weight: 600;
            color: #8c8e90;
            padding: 20px;
            white-space: nowrap;
            cursor: pointer;
            line-height: 101%;

            @media (max-width: 650px) {
              font-size: 14px;
              border: 1.5px solid #e6e6e8;
              border-radius: 44px;
              padding: 9px 16px;
              font-weight: 500;
              color: #74798A;
            }
          }

          .cmp-tabs__tab--active {
            border: 1px solid #e6e7eb;
            border-radius: 12px;
            color: #232426;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);

            @media (max-width: 650px) {
              background: #E6E6E8;
              border-radius: 44px;
              font-family: Archivo;
            }
          }
        }

        .cmp-tabs__tablist::-webkit-scrollbar {
          display: none;
        }

        .cmp-tabs__tabpanel {
          width: 80%;

          @media screen and (max-width: 650px) {
            width: 100%;
          }

          .cmp-container {
            display: flex;
            gap: 20px;
            overflow-x: auto;

            @media screen and (max-width: 650px) {
              gap: 0;
            }

            .teaser {
              @media screen and (max-width: 650px) {
                margin-right: 10px;
              }

              .cmp-teaser {
                display: flex;
                gap: 18px;
                flex-direction: column;
                min-width: 325px;
                width: 325px;

                @media (max-width: 767px) {
                  min-width: 304px;
                  width: 304px;
                  border: 1px solid #CACBCC;
                  border-radius: 12px;
                  padding: 6px;
                }

                .cmp-teaser__content {
                  order: 2;

                  @media (max-width: 767px) {
                    padding: 0 10px 5px;
                    min-height: 71px;
                  }

                  .cmp-teaser__title {
                    font-size: 20px;
                    font-weight: 600;
                    color: #232426;
                    line-height: 132%;

                    @media (max-width: 767px) {
                      font-size: 18px;
                      color: #141517;
                    }
                  }

                  .cmp-teaser__description {
                    margin-top: 10px;
                    font-size: 14px;
                    font-weight: 400;
                    color: #75787b;
                    line-height: 132%;

                    @media (max-width: 767px) {
                      font-size: 12px;
                      color: #6B6767;
                      margin-top: 6px;
                    }
                  }
                }

                .cmp-teaser__image {
                  min-height: 400px;
                  overflow: hidden;

                  @media (max-width: 767px) {
                    max-height: 356px;
                  }

                  div {
                    overflow: hidden;
                    border-radius: 8px;

                    img {
                      min-height: 400px;
                      border-radius: 8px;
                      transition: .3s ease-in-out;

                      &:hover {
                        transform: scale(1.1);
                      }

                      @media (max-width: 767px) {
                        max-height: 356px;
                      }
                    }
                  }

                  .img {
                    height: 400px;
                    object-fit: cover;
                  }
                }
              }
            }
          }

          .cmp-container::-webkit-scrollbar {
            display: none;
          }
        }
      }
    }
  }
}

.unitsandaccessories-container .cmp-container .cmp-tabs__tab {
  line-height: 101%;
}

.unitsandaccessories-container .cmp-container .text {
  line-height: 101%;
}

.unitsandaccessories-container .cmp-container > :last-child > div > .cmp-teaser__image {
  margin-right: 16px;
}

/* ─── Breakpoint-based margin-left hacks (REPLACED by JS syncLeftAlignment) ───
   Kept here for reference. Safe to delete permanently once JS fix is confirmed.

@media (min-width: 1024px) and (max-width: 1360px) {
  .unitsandaccessories-container .cmp-tabs {
    margin-left: 7%;
  }
  .unitsandaccessories-container .cmp-container {
    gap: 20px;
    row-gap: 35px;
  }
  .unitsandaccessories-container .cmp-container .text {
    margin-left: 7%;
  }
}

@media (min-width: 1360px) and (max-width: 1439px) {
  .unitsandaccessories-container .cmp-tabs {
    margin-left: 10%;
  }
  .unitsandaccessories-container .cmp-container {
    gap: 20px;
    row-gap: 35px;
  }
  .unitsandaccessories-container .cmp-container .text {
    margin-left: 10%;
  }
}

@media (min-width: 1400px) and (max-width: 1500px) {
  .unitsandaccessories-container .cmp-tabs {
    margin-left: 40px;
  }
  .unitsandaccessories-container .cmp-container .text {
    margin-left: 40px;
  }
}

@media (min-width: 1500px) and (max-width: 1599px) {
  .unitsandaccessories-container .cmp-tabs {
    margin-left: 5%;
  }
  .unitsandaccessories-container .cmp-container .text {
    margin-left: 5%;
  }
}

@media (min-width: 1600px) and (max-width: 1679px) {
  .unitsandaccessories-container .cmp-tabs {
    margin-left: 7%;
  }
  .unitsandaccessories-container .cmp-container .text {
    margin-left: 7%;
  }
}

@media (min-width: 1680px) and (max-width: 1900px) {
  .unitsandaccessories-container .cmp-tabs {
    margin-left: 9.5%;
  }
  .unitsandaccessories-container .cmp-container .text {
    margin-left: 9.5%;
  }
}

@media (min-width: 1900px) {
  .unitsandaccessories-container .cmp-tabs {
    margin-left: 14.5%;
  }
  .unitsandaccessories-container .cmp-container .text {
    margin-left: 14.5%;
  }
}
─────────────────────────────────────────────────────────────────────────────── */


/* ─── Button wrapper ─────────────────────────────────────────────────────────── */
.unitsandaccessories-container .ua-carousel-btn-wrapper {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding-right: 40px;
  position: absolute;
  right: 0;
  top: 22px;
}

/* Prev / Next buttons */
.unitsandaccessories-container .ua-trending-finishes-prev,
.unitsandaccessories-container .ua-trending-finishes-next {
  width: 64px;
  height: 64px;
  border: 1px solid #ddd;
  background: #fff;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .3s ease;
}

.unitsandaccessories-container .ua-trending-finishes-prev:hover,
.unitsandaccessories-container .ua-trending-finishes-next:hover {
  background: #f4f4f5;
  border-color: #bbbbbe;
}

/* Scrollable cards row */
.unitsandaccessories-container .cmp-tabs__tabpanel .cmp-container {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  overflow-x: auto;
  scroll-behavior: smooth;
  gap: 20px;
}

.unitsandaccessories-container .cmp-tabs__tabpanel .cmp-container::-webkit-scrollbar {
  display: none;
}

@media (max-width: 767px) {
  .unitsandaccessories-container .cmp-container .cmp-teaser__description {
    color: #6B6767;
    font-size: 12px;
  }

  .unitsandaccessories-container .cmp-container .cmp-teaser__title {
    font-size: 18px;
  }

  .unitsandaccessories-container .cmp-container .cmp-tabs__tab {
    color: #74798A;
  }

  .ua-carousel-btn-wrapper {
    display: none !important;
  }

  .unitsandaccessories-container .cmp-container > :last-child > div > .cmp-teaser__image {
    margin-right: 0;
  }
}