/* إعدادات عامة */
html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  padding: 20px;
  width: 100%;
  min-height: 100vh;
  font-family: 'Arial', sans-serif;
  background-color: #00a862;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  transition: all 0.5s ease;
}

/* الحاوية الرئيسية */
.main-container.main-layer {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90%;
  max-width: 400px;
  height: 90vh;
  max-height: 800px;
  background-color: #ffffff;
  border-radius: 20px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  z-index: 1;
  transition: none;
}

/* الشعار */
.logo {
  width: 100%;
  height: 100px; /* تقليل ارتفاع الشعار */
  background-color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo img {
  max-width: 80px;
  height: auto;
}

/* قسم عرض المنتج */
.product-section {
  height: 320px; /* تعديل ارتفاع القسم */
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #ffffff;
}

.swiper {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
}

.swiper-slide {
  display: flex;
  align-items: center;
  justify-content: center;
}

.swiper-slide img {
  max-width: 100%;
  height: auto;
  object-fit: contain;
  max-height: 240px; /* تصغير الصورة قليلاً */
  margin: 0 auto;
}

/* التفاصيل */
.details {
  padding: 10px 15px; /* ضبط المسافة الداخلية */
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.details-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.price {
  font-size: 20px;
  font-weight: bold;
  color: #333333;
}

.size {
  font-size: 12px;
  padding: 5px 8px;
  background-color: #f3f3f3;
  border-radius: 15px;
  color: #555555;
}

.product-title {
  font-size: 16px;
  font-weight: bold;
  color: #333333;
  margin-bottom: 5px;
}

.description {
  font-size: 12px;
  color: #555555;
  line-height: 1.4;
  margin-bottom: 10px;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* زر الدعوة (CTA Button) */
.cta-button {
  background-color: #000;
  color: #fff;
  border: none;
  border-radius: 25px;
  padding: 8px 20px;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.3s ease;
  margin: 0 auto;
  width: 80%;
  max-width: 300px;
}

.cta-button:hover {
  background-color: #333333;
}

/* روابط الفوتر */
.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 5px;
  margin-top: 10px;
  font-size: 10px;
}

.footer-links a {
  color: #666666;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-links a:hover {
  color: #008a50;
}

/* إضافة نقاط صغيرة بين روابط الفوتر */
.footer-links a {
  position: relative;
}

.footer-links a::after {
  content: "•"; /* النقطة */
  color: #cccccc; /* لون النقطة */
  margin: 0 8px; /* مسافة بين الرابط والنقطة */
  font-size: 12px;
}

.footer-links a:last-child::after {
  content: ""; /* إزالة النقطة بعد الرابط الأخير */
}


/* الأزرار العائمة */
.floating-buttons {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1000;
}

.floating-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background-color: #000;
  color: #fff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 6px rgba(0,0,0,0.16);
  cursor: pointer;
  transition: all 0.3s ease;
}

.floating-btn i {
  font-size: 20px;
}

.main-btn {
  background-color: #000;
}

.sub-buttons {
  position: absolute;
  bottom: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transform: translateY(0);
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease;
}

.floating-buttons.active .main-btn {
  transform: rotate(45deg);
}

.floating-buttons.active .sub-buttons {
  transform: translateY(-120px);
  opacity: 1;
  pointer-events: all;
}

@media (max-width: 600px) {
  .main-container.main-layer {
    width: 95%;
    height: 80vh;
  }
}

/* الطبقة المنبثقة */
.overlay-layer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.overlay-layer.active {
  display: flex;
}

/* حاوية المحتوى */
.overlay-layer > div:first-child {
  position: relative;
  width: 90%;
  max-width: 400px;
  height: 95vh;
  background-color: #ffffff;
  border-radius: 20px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* تحسينات للأجهزة المتوسطة والصغيرة */
@media (max-width: 768px) {
  .overlay-layer > div:first-child {
    width: 95%;
    height: 85vh;
  }
}

@media (max-width: 480px) {
  .overlay-layer > div:first-child {
    width: 100%;
    height: 100vh;
    border-radius: 0;
  }
}

/* للشاشات الطويلة */
@media (min-height: 900px) {
  .main-container.main-layer {
    height: 80vh;
  }
}
