/* ============================================
   Slider 1: Hero Carousel (بانر رئيسي متحرك)
   Vanilla CSS - قابل لإعادة الاستخدام
   ============================================ */

.hs-slider {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: 20px;
  aspect-ratio: 16 / 8.2;
  max-height: 220px;
  touch-action: pan-y;
  -webkit-user-select: none;
  user-select: none;
}

.hs-track {
  display: flex;
  direction: ltr; /* دايمًا LTR داخليًا عشان حساب الإزاحة يفضل ثابت بغض النظر عن اتجاه الصفحة */
  width: 100%;
  height: 100%;
  transition: transform 0.45s cubic-bezier(0.22, 0.61, 0.36, 1);
  will-change: transform;
}

.hs-slide {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.hs-content {
  direction: rtl;
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 18px 22px 18px 45%;
  color: white;
  box-sizing: border-box;
}

.hs-badge {
  display: inline-block;
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(4px);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 800;
  margin-bottom: 8px;
}

.hs-title {
  font-size: 17px;
  font-weight: 900;
  margin: 0 0 10px;
  line-height: 1.3;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.15);
}

.hs-price-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.hs-price-old {
  font-size: 12px;
  text-decoration: line-through;
  opacity: 0.75;
}

.hs-price-new {
  font-size: 22px;
  font-weight: 900;
}

.hs-price-new.hs-pulse {
  animation: hsPulse 0.6s ease;
}

@keyframes hsPulse {
  0% { transform: scale(1); }
  35% { transform: scale(1.18); }
  100% { transform: scale(1); }
}

.hs-img {
  position: absolute;
  left: 5%;
  top: 12%;
  height: 76%;
  max-width: 40%;
  object-fit: contain;
  z-index: 1;
  background: white;
  border-radius: 16px;
  padding: 10px;
  box-sizing: border-box;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
  pointer-events: none;
}

.hs-progress-row {
  position: absolute;
  bottom: 10px;
  left: 14px;
  right: 14px;
  z-index: 3;
  display: flex;
  gap: 6px;
}

.hs-progress-track {
  flex: 1;
  height: 4px;
  background: rgba(255, 255, 255, 0.35);
  border-radius: 4px;
  overflow: hidden;
  border: none;
  padding: 0;
  cursor: pointer;
  -webkit-appearance: none;
}

.hs-progress-fill {
  display: block;
  height: 100%;
  width: 0%;
  background: white;
  border-radius: 4px;
}

.hs-progress-fill.filled {
  width: 100%;
}

.hs-progress-fill.animating {
  animation-name: hsFill;
  animation-timing-function: linear;
  animation-fill-mode: forwards;
}

@keyframes hsFill {
  from { width: 0%; }
  to { width: 100%; }
}

@media (max-width: 480px) {
  .hs-slider { max-height: 190px; }
  .hs-title { font-size: 15px; }
  .hs-price-new { font-size: 19px; }
  .hs-content { padding: 16px 18px 16px 42%; }
}
