/* الخطوط وتنسيق عام */
body {
  margin: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: #f7f7f7;
  color: #333;
  direction: rtl;
}

.header {
  background-color: #790909;
  color: white;
  text-align: center;
  padding: 20px;
  font-size: 24px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

main.product-container {
  max-width: 1200px;
  margin: 30px auto;
  padding: 0 20px;
}

/* وصف المنتج */
.description {
  background-color: white;
  padding: 20px;
  margin-bottom: 30px;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.description h2 {
  margin-top: 0;
  color: #8a0d17;
}

/* معرض الصور */
.gallery {
  background-color: white;
  padding: 20px;
  margin-bottom: 30px;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.gallery h2 {
  margin-top: 0;
  color: #800b11;
}

.images-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 15px;
  margin-top: 15px;
}

.images-grid img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.images-grid img:hover {
  transform: scale(1.05);
}

/* الفيديو */
.video-section {
  background-color: white;
  padding: 20px;
  margin-bottom: 30px;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.video-section h2 {
  color: #6b0810;
  margin-top: 0;
}

.video-container {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 نسبة العرض */
  height: 0;
  overflow: hidden;
  border-radius: 12px;
}

.video-container video {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  right: 0;
}

/* المودال - عرض الصورة */
.modal {
  display: none;
  position: fixed;
  z-index: 999;
  padding-top: 60px;
  right: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.8);
}

.modal-content {
  margin: auto;
  display: block;
  max-width: 90%;
  max-height: 80vh;
  border-radius: 10px;
  box-shadow: 0 0 15px #000;
}

.close {
  position: absolute;
  top: 20px;
  left: 30px;
  color: white;
  font-size: 35px;
  font-weight: bold;
  cursor: pointer;
}
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  padding-top: 50px;
  right: 0;
  bottom: 0;
  left: 0;
  top: 0;
  background-color: rgba(0,0,0,0.8);
  text-align: center;
}

.modal-content {
  max-width: 90%;
  max-height: 80vh;
  margin: auto;
  display: block;
  border-radius: 10px;
}

.close {
  position: absolute;
  top: 20px;
  left: 30px;
  color: white;
  font-size: 40px;
  cursor: pointer;
}

.nav-btn {
  position: absolute;
  top: 50%;
  background-color: rgba(255,255,255,0.6);
  border: none;
  font-size: 30px;
  cursor: pointer;
  padding: 10px;
  border-radius: 50%;
  transform: translateY(-50%);
  user-select: none;
}

#prevBtn {
  right: 90%;
}

#nextBtn {
  left: 90%;
}
