/* =========================
   CAR SIZE SECTION
========================= */

.car-size-section {
  background: #fff;
  padding: 60px 0;
  overflow: hidden;
}

.car-size-header {
  text-align: center;
  margin-bottom: 25px;
}

.car-size-header h2 {
  margin: 0 0 8px;
  font-size: 28px;
  font-weight: 700;
  color: #111;
}

.car-size-header p {
  margin: 0;
  color: #444;
}

/* =========================
   AREA
========================= */

.car-size-area {
  position: relative;
}

/* =========================
   SLIDER
========================= */

.car-size-slider {
  position: relative;
  width: 100%;
}

.car-size-wrapper {
  display: flex;
  flex-direction: row;
  gap: 0;
  margin: 0;
  padding: 0;
  align-items: flex-start;
}

/* =========================
   ITEM
========================= */

.car-item {
  flex: 1;
  min-width: 0;
  margin: 0;
  padding: 0;
  position: relative;
  cursor: pointer;
  transition: flex 0.4s ease;
}

.car-item.active {
  flex: 2;
}

.car-item img {
  width: 100%;
  height: 320px;
  display: block;
  object-fit: cover;
  margin: 0;
  padding: 0;
}

/* أول صورة يمين */
.car-item:first-child img {
  border-radius: 0 6px 6px 0;
}

/* آخر صورة شمال */
.car-item:last-child img {
  border-radius: 6px 0 0 6px;
}

/* الخط الأخضر بين الصور زي الصورة */
.car-item.active {
  border-left: 2px solid #00ff99;
}

/* =========================
   LABEL تحت الصورة
========================= */

.car-label {
  width: fit-content;
  min-width: 90px;
  margin: 16px auto 0;
  padding: 8px 20px;

  color: #222;
  background: transparent;

  border: 2px solid transparent;
  border-radius: 6px;

  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  text-align: center;

  transition: 0.3s ease;
}

/* effect عند hover أو active */
.car-item:hover .car-label,
.car-item.active .car-label {
  border-color: #00ff99;
  background: rgba(0, 255, 153, 0.12);
  transform: translateY(-4px);
}

/* =========================
   ARROWS خارج الصور زي الصورة
========================= */

.arrow {
  position: absolute;
  top: 130px; /* نص ارتفاع الصورة: 320 / 2 */
  transform: translateY(-50%);

  width: 48px;
  height: 48px;

  border: 0;
  padding: 0;
  border-radius: 50%;

  background: #000;
  color: #fff;

  display: flex;
  align-items: center;
  justify-content: center;

  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  z-index: 50;

  transition: 0.3s ease;
}

.arrow-left {
  left: 10px;

}

.arrow-right {
  right: 10px;
}

.arrow:hover {
  background: #00ff99;
  color: #000;
}

/* =========================
   RESPONSIVE
========================= */

@media (max-width: 992px) {
  .car-item img {
    height: 260px;
  }

  .arrow {
    top: 130px;
  }
}

@media (max-width: 768px) {
  .car-size-section {
    padding: 40px 0;
  }

  .car-item img {
    height: 210px;
  }

  .arrow {
    top: 105px;
    width: 38px;
    height: 38px;
    font-size: 18px;
  }

  .arrow-left {
    left: 5px;
  }

  .arrow-right {
    right: 5px;
  }

  .car-label {
    min-width: 70px;
    padding: 7px 14px;
    font-size: 13px;
  }
}

@media (max-width: 480px) {
  .car-size-wrapper {
    flex-direction: column;
  }

  .car-item,
  .car-item.active {
    flex: none;
    width: 100%;
    border-left: 0;
  }

  .car-item img {
    height: 180px;
    border-radius: 6px;
  }

  .arrow {
    display: none;
  }
}