/* =========================================================
   TWT — Tyre Features Carousel
   - 3/2/1 items per view (desktop/tablet/phone)
   - Headings full width per column
   - Compact typography, tidy gutters
   - Uniform card heights (line-clamp)
   - Works with the infinite JS provided
   ========================================================= */

:root{
  --twt-red:#410099;
  --twt-black:#000000;
  --twt-fg:#e8e8e8;
}

/* Section shell */
.twt-tyre-features{
  background: var(--twt-black);
  color: var(--twt-fg);
  padding: 36px 0 44px;
}
.twt-tyre-features__inner{
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
}

/* ---------- Carousel layout: 3 / 2 / 1 per view ---------- */
.twt-tyre-features__viewport{
  overflow: hidden;
}

.twt-tyre-features__track{
  display: flex;
  will-change: transform;
  transition: transform .28s ease;
}

/* Each slide = a column card */
.twt-tyre-features__slide{
  flex: 0 0 calc(100% / 3);
  padding-right: 40px;              /* column gutter */
  box-sizing: border-box;
  display: flex;                     /* column layout for header/body */
  flex-direction: column;
}
.twt-tyre-features__slide:last-child{
  padding-right: 0;
}

/* Tablet */
@media (max-width:1100px){
  .twt-tyre-features__slide{
    flex-basis: calc(100% / 2);
    padding-right: 28px;
  }
}

/* Phone */
@media (max-width:720px){
  .twt-tyre-features__slide{
    flex-basis: 100%;
    padding-right: 0;
  }
}

/* ---------- Headings must span full width ---------- */
.twt-tyre-features__header{
  width: 100%;
  flex: 0 0 auto;                  /* keep header from shrinking */
  margin: 0 0 10px;
}

.twt-tyre-features__title{
  display: block;
  width: 100%;
  margin: 0 0 12px;
  font-weight: 900;
  font-size: clamp(20px, 2.2vw, 30px); /* reduced size for tidier look */
  line-height: 1.15;
  letter-spacing: .01em;
  color: var(--twt-fg);
  min-width: 0;                     /* avoid overflow in flex */
}

/* ---------- Body (badge + copy) ---------- */
.twt-tyre-features__body{
  display: flex;
  align-items: flex-start;
  gap: 12px;
  flex: 1 1 auto;                   /* fill remaining height */
}

.twt-tyre-features__badge{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--twt-red);
  color: #fff;
  font-weight: 900;
  width: 60px;
  height: 48px;
  border-radius: 4px;
  clip-path: polygon(0 0, 86% 0, 100% 50%, 86% 100%, 0 100%);
  padding-right: 8px;               /* optical alignment for angled edge */
  font-size: 22px;
  padding-left: 10px;
}

/* Keep cards the same height with a neat 3-line clamp */
.twt-tyre-features__text{
  margin: 0;
  font-size: 16px;
  line-height: 1.5;
  color: var(--twt-fg);
  display: -webkit-box;
  -webkit-line-clamp: 3;            /* uniform height */
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ---------- Progress bar ---------- */
.twt-tyre-features__progress{
  position: relative;
  height: 5px;
  margin: 28px 0 18px;
  background: #2a2a2a;
  border-radius: 999px;
  overflow: hidden;
}
.twt-tyre-features__bar{
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: var(--twt-progress, 0%);
  background: var(--twt-red);
  transition: width .25s ease;
}

/* ---------- Navigation buttons ---------- */
.twt-tyre-features__nav{
  display: flex;
  gap: 16px;
  justify-content: flex-end;
}
.twt-tyre-features__btn{
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--twt-red);
  border: 0;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease;
}
.twt-tyre-features__btn:hover{
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(227,30,36,.25);
}
.twt-tyre-features__btn:focus-visible{
  outline: none;
  box-shadow: 0 0 0 3px rgba(227,30,36,.35);
}

/* Chevrons */
.twt-chevron{
  width: 9px;
  height: 9px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
}
.twt-chevron--right{ transform: rotate(-45deg); }
.twt-chevron--left { transform: rotate(135deg); }
