/* ==================== قائمة اللغة ==================== */
.lang-menu {
  position: relative;
  display: inline-block;
}

.selected-lang {
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
}

.selected-lang img,
.lang-dropdown img {
  width: 25px;
  height: auto;
  border-radius: 50%;
  object-fit: cover;
}

.lang-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  left: auto;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  padding: 8px 0;
  z-index: 1000;
  min-width: 120px;

  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  pointer-events: none;
}

.lang-dropdown.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.lang-dropdown a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  color: #333;
  text-decoration: none;
  transition: background 0.2s;
}

.lang-dropdown a:hover {
  background: #f5f5f5;
}

/* ==================== شريط الأخبار المتحرك ==================== */
@keyframes marquee-arabic {
  0% {
    transform: translateX(100%);
  }

  100% {
    transform: translateX(-100%);
  }
}

.marquee-container {
  overflow: hidden;
  position: relative;
  background: #FFCD34;
  padding: 8px 0;
}

.marquee-track {
  display: inline-block;
  white-space: nowrap;
  animation: marquee-arabic 25s linear infinite;
  will-change: transform;
}

.marquee-track:hover {
  animation-play-state: paused;
  cursor: pointer;
}

/* ==================== السلايدر الرئيسي ==================== */
.swiper-container-wrapper {
  max-width: 1300px;
  padding: 0 16px;
  margin: 0 auto;
}

.mySwiper {
  width: 100%;
  height: auto;
  aspect-ratio: 16/9;
  max-height: 550px;
  border-radius: 18px;
  overflow: hidden;
}

.mySwiper .swiper-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mySwiper .swiper-pagination-bullet {
  width: 10px;
  height: 6px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.5);
  opacity: 1;
  margin: 0 4px !important;
  transition: all 0.3s ease;
}

.mySwiper .swiper-pagination-bullet-active {
  width: 24px;
  background: #FFCD34;
}

.mySwiper .swiper-pagination {
  padding: 0 12px;
  bottom: 20px !important;
}

/* Responsive for main slider */
@media (max-width: 1024px) {
  .mySwiper {
    aspect-ratio: 4/3;
    max-height: 450px;
    border-radius: 14px;
  }
}

@media (max-width: 768px) {
  .mySwiper {
    aspect-ratio: 1/1;
    max-height: 400px;
    border-radius: 12px;
  }
}

/* ==================== سلايدر المنتجات ==================== */
.product-slider-wrapper {
  max-width: 1300px;
  padding: 0 16px;
  margin: 0 auto;
}

.product-section {
  padding: 40px 0;
}

.productMainSlider {
  width: 100%;
  padding-bottom: 50px;
}

.productMainSlider .swiper-slide {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  padding: 0 8px;
}

.productMainSlider .product-card {
  width: 100%;
  max-width: 250px;
  margin: 0 auto;
}

.productMainSlider .swiper-pagination-bullet {
  width: 10px;
  height: 6px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.2);
  opacity: 1;
  margin: 0 4px !important;
  transition: background-color 0.3s ease;
}

.productMainSlider .swiper-pagination-bullet-active {
  width: 24px;
  background: #FFCD34;
}

.productMainSlider .swiper-pagination {
  padding-top: 16px;
  text-align: center;
}

/* Responsive for product slider */
@media (max-width: 1200px) {
  .productMainSlider .swiper-slide {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 992px) {
  .productMainSlider .swiper-slide {
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
  }
}

@media (max-width: 768px) {
  .productMainSlider .swiper-slide {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .product-section {
    padding: 30px 0;
  }
}

@media (max-width: 480px) {
  .productMainSlider .swiper-slide {
    grid-template-columns: 1fr;
  }
}

/* ==================== تحسينات RTL عامة ==================== */
[dir="rtl"] {
  text-align: right;
}

[dir="rtl"] .lang-dropdown {
  right: 0;
  left: auto;
}

/* ==================== تحسينات أداء عامة ==================== */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

body {
  overflow-x: hidden;
}

* {
  box-sizing: border-box;
}