
body { font-family: Arial,sans-serif; background:#f5f5f5; margin:0; padding:0; direction: rtl; }
.top-bar { display:flex; justify-content:space-between; align-items:center; padding:10px 20px; background:#fff; box-shadow:0 2px 6px rgba(0,0,0,0.1); }
.back-btn { display:inline-block; padding:8px 15px; background:#6c5ce7; color:white; border-radius:8px; text-decoration:none; }
.back-btn:hover { background:#5746c8; }
.cart-count { font-weight:bold; }

.product-details { max-width:1200px; margin:20px auto; padding:20px; background:#fff; border-radius:10px; box-shadow:0 4px 15px rgba(0,0,0,0.2); }
.product-layout { display:flex; flex-wrap:nowrap; gap:20px; align-items:flex-start; }
.product-gallery { flex:0 0 45%; max-width:45%; position:relative; overflow:hidden; border-radius:10px; box-shadow:0 4px 15px rgba(0,0,0,0.2); background:#fefefe; }
.slider-container { width:100%; aspect-ratio:1/1; overflow:hidden; border-radius:10px; position:relative; }
.slider-images {
  position: relative;
  width: 100%;
  height: 100%;
}

.slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.slide.active {
  opacity: 1;
  z-index: 1;
}

.slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 25px;
  cursor: pointer;
}

.product-info { flex:1; min-width:300px; }
.product-info h2 { font-size:28px; margin-bottom:15px; color:#2d3436; }
.product-info p { font-size:16px; margin:8px 0; line-height:1.5; }
.product-info strong { color:#636e72; }

.add-cart-btn { padding:12px 25px; background:#ff5722; color:white; border:none; border-radius:8px; cursor:pointer; font-size:18px; margin-top:15px; transition:0.3s; }
.add-cart-btn:hover { background:#e64a19; }

.currency-selector { margin:10px 0; }
.currency-selector select { padding:6px 10px; border-radius:6px; border:1px solid #ccc; font-size:16px; }

.rating { display:flex; align-items:center; gap:5px; font-size:18px; color:#ffa500; margin:10px 0; }
.reviews { margin-top:20px; }
.review { border-top:1px solid #eee; padding:12px 0; }
.review p { margin:4px 0; }
.review small { color:#636e72; }

.related-products { margin-top:30px; }
.related-products h3 { margin-bottom:10px; }
.related-grid { display:flex; flex-wrap:wrap; gap:15px; }
.related-grid .item { flex:1; min-width:200px; max-width:250px; background:#fff; padding:10px; border-radius:10px; box-shadow:0 3px 10px rgba(0,0,0,0.1); text-align:center; transition:0.3s; }
.related-grid .item:hover { transform:scale(1.05); }
.related-grid img { width:100%; height:150px; object-fit:cover; border-radius:10px; }

.lightbox { display:none; position:fixed; top:0; left:0; width:100%; height:100%; background:rgba(0,0,0,0.85); justify-content:center; align-items:center; z-index:1000; }
.lightbox img { max-width:90%; max-height:90%; border-radius:10px; }
.lightbox.show { display:flex; }

@media (max-width:768px) {
  .product-layout { flex-direction:column; }
  .product-gallery { max-width:100%; flex:1 1 100%; }
}

/* style5.css */

/* الصفحة بالكامل */
body {
  background: linear-gradient(135deg, #9a0303, #4f01a2d6, #c80000, #ae009d, #2a02bc, #d13201e8);
  background-size: 400% 400%;
  animation: bg 15s ease infinite;
  font-family: 'Arial', sans-serif;
  margin: 0;
  padding: 0;
  direction: rtl;
}

@keyframes bg {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* زر العودة */
.back-btn {
    display: inline-block;
    margin: 20px;
    padding: 10px 20px;
    background: #6c5ce7;
    color: white;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    transition: 0.3s;
}
.back-btn:hover {
    background: #5746c8;
}

/* تفاصيل المنتج */
/* ===================== مظهر المنتج المحسن ===================== */

/* صندوق المنتج */
.product-details {
    max-width: 1100px;
    margin: 30px auto;
    padding: 30px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 10px 35px rgba(0,0,0,0.15);
    display: flex;
    flex-direction: column;
    gap: 25px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.product-details:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 45px rgba(0,0,0,0.25);
}

/* تخطيط المنتج */
/* ===================== مظهر المنتج الفائق ===================== */

/* صندوق المنتج */
.product-details {
    max-width: 930px;
    margin: 40px auto;
    padding: 25px;
    background: rgba(255, 255, 255, 0.97);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.15), 0 8px 30px rgba(0,0,0,0.1) inset;
    display: flex;
    flex-direction: column;
    gap: 30px;
    transition: transform 0.4s ease, box-shadow 0.4s ease, background 0.4s ease;
    position: relative;
}
.product-details::before {
    content: "";
    position: absolute;
    top: -5px; left: -5px; right: -5px; bottom: -5px;
    border-radius: 25px;
    background: linear-gradient(135deg, #ff5722, #ff4081, #3f51b5, #009688, #ffc107);
    opacity: 0.15;
    z-index: 0;
}
.product-details:hover {
    transform: translateY(-8px) scale(1.01);
    box-shadow: 0 25px 75px rgba(0,0,0,0.25), 0 10px 40px rgba(0,0,0,0.15) inset;
}

/* تخطيط المنتج */
.product-layout {
    display: flex;
    gap: 35px;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

/* ----- صور المنتج ----- */
.product-gallery {
    flex: 1 1 400px;
    min-width: 320px;
    max-width: 450px;
    background: #ffffff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
    position: relative;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}
.product-gallery:hover {
    transform: scale(1.02);
    box-shadow: 0 15px 50px rgba(0,0,0,0.2);
}

.slider-container {
    width: 100%;
    aspect-ratio: 1/1;
    overflow: hidden;
    border-radius: 25px;
    position: relative;
}
.slider-images {
    display: flex;
    transition: transform 0.6s ease;
}
.slider-images img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 25px;
    cursor: pointer;
    transition: transform 0.5s ease, box-shadow 0.4s ease;
}
.slider-images img:hover {
    transform: scale(1.1) rotate(1deg);
    box-shadow: 0 12px 30px rgba(0,0,0,0.35);
}

/* أزرار السلايدر */
.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.45);
    color: #fff;
    border: none;
    font-size: 28px;
    padding: 12px 18px;
    cursor: pointer;
    border-radius: 50%;
    z-index: 10;
    transition: background 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}
.slider-btn:hover {
    background: rgba(0,0,0,0.85);
    transform: translateY(-50%) scale(1.15);
    box-shadow: 0 8px 25px rgba(0,0,0,0.4);
}
.slider-btn.prev { left: 15px; }
.slider-btn.next { right: 15px; }



/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.9);
    justify-content: center;
    align-items: center;
    z-index: 3000;
    animation: fadeIn 0.5s ease forwards;
}
.lightbox.show { display: flex; }
.lightbox img {
    max-width: 92%;
    max-height: 92%;
    border-radius: 20px;
    box-shadow: 0 20px 70px rgba(0,0,0,0.7);
}

/* ----- معلومات المنتج ----- */
.product-info {
    flex: 1 1 450px;
    min-width: 320px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    position: relative;
    z-index: 1;
}
.product-info h2 {
    font-size: 34px;
    font-weight: 800;
    color: #2c3e50;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}
.product-info p {
    font-size: 17px;
    line-height: 1.7;
    color: #4a4a4a;
}
.product-info p strong {
    color: #ff5722;
    font-weight: 700;
}
.product-info .sku {
    font-size: 14px;
    color: #888;
    letter-spacing: 0.5px;
}



/* زر إضافة للسلة */
.add-cart-btn {
    padding: 16px 32px;
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(120deg, #ff5722, #ff7043, #ff8a65);
    border: none;
    border-radius: 15px;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(255,87,34,0.5), 0 0 12px rgba(255,87,34,0.2) inset;
    transition: all 0.4s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.add-cart-btn:hover {
    background: linear-gradient(120deg, #e64a19, #f4511e, #ff6e40);
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 12px 35px rgba(255,87,34,0.6), 0 0 18px rgba(255,87,34,0.25) inset;
}
.add-cart-btn::after {
    
    margin-left: 10px;
    transition: margin-left 0.3s ease, transform 0.3s ease;
}
.add-cart-btn:hover::after {
    margin-left: 20px;
    transform: scale(1.2);
}

/* اختيار العملة */
.currency-selector {
    margin: 15px 0;
}
.currency-selector select {
    padding: 10px 14px;
    font-size: 16px;
    border-radius: 12px;
    border: 1px solid #ccc;
    background: #fdfdfd;
    cursor: pointer;
    transition: 0.3s;
}
.currency-selector select:hover {
    border-color: #ff5722;
    box-shadow: 0 2px 8px rgba(255,87,34,0.3);
}

/* ----- التقييم ----- */
.rating {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 22px;
    color: #f1c40f;
}
.star-rating span {
    font-size: 26px;
    cursor: pointer;
    transition: transform 0.3s ease, color 0.3s ease, text-shadow 0.3s ease;
}
.star-rating span:hover {
    transform: scale(1.25);
    color: #ffd700;
    text-shadow: 0 0 6px #ffd700, 0 0 12px #fff;
}

/* ----- التعليقات ----- */
.reviews {
    margin-top: 30px;
}
.reviews h3 {
    font-size: 24px;
    margin-bottom: 15px;
    color: #2c3e50;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.05);
}
.review {
    border-top: 1px solid #eee;
    padding: 15px 0;
    transition: background 0.3s, box-shadow 0.3s ease;
}
.review:hover {
    background: #f7f7f7;
    box-shadow: inset 0 0 8px rgba(0,0,0,0.05);
}
.review p { margin: 6px 0; color: #555; }
.review small { color: #888; font-size: 14px; }

/* ----- المنتجات ذات الصلة ----- */
.related-products {
    margin-top: 40px;
}
.related-products h3 {
    font-size: 24px;
    margin-bottom: 18px;
    color: #2c3e50;
}
.related-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}
.related-grid .item {
    flex: 1 1 220px;
    max-width: 250px;
    background: #fff;
    border-radius: 20px;
    padding: 14px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.12);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.related-grid .item:hover {
    transform: translateY(-6px) scale(1.04);
    box-shadow: 0 15px 40px rgba(0,0,0,0.18);
}
.related-grid img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-radius: 15px;
}

/* ----- استجابة الهواتف ----- */
@media(max-width: 992px) {
    .product-layout { flex-direction: column; gap: 25px; }
    .related-grid { justify-content: center; }
}
@media(max-width: 576px) {
    .product-info h2 { font-size: 28px; }
    .product-info p { font-size: 15px; }
    .add-cart-btn { font-size: 17px; padding: 14px 26px; }
    .rating { font-size: 20px; }
    .star-rating span { font-size: 24px; }
}

/* ================== حركات إضافية ================== */
@keyframes fadeIn { 0%{opacity:0;} 100%{opacity:1;} }

/* ================== إضافات جمالية دقيقة ================== */
.product-info p strong {
    color: #ff5722;
}
.add-cart-btn::after {
    
    display: inline-block;
    margin-left: 6px;
    transition: margin-left 0.3s ease;
}
.add-cart-btn:hover::after {
    margin-left: 12px;
}
.review .rating span {
    transition: color 0.3s, transform 0.2s;
}
.review .rating span:hover {
    transform: scale(1.1);
}

/* تصميم استجابة الهواتف */
@media (max-width: 768px) {
    .product-layout {
        flex-direction: column;
    }
}

/* ================== أزرار إضافة للسلة ================== */
/* ======= متغيرات تحكم رقمية ======= */
:root {
    /* رفع أو خفض */
    --back-btn-top: 0px;       /* زر العودة: سالب يرفع، موجب ينزل */
    --cart-top: 0px;           /* السلة: سالب يرفع، موجب ينزل */

    /* تحريك لليسار واليمين */
    --back-btn-left: 0px;      /* زر العودة: موجب يتحرك لليمين، سالب لليسار */
    --cart-right: 0px;         /* السلة: موجب يتحرك للداخل من اليمين */
}

/* ======= الشريط العلوي ======= */
.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 15px; /* 🔽 قللنا الارتفاع */
  background: linear-gradient(90deg, #272525, #6c00af, #c54200, #c40000, #0705b5, #c42708, #740496, #373535);
  color: white;
  font-size: 12px;   /* 🔽 حجم خط أصغر */
  height: 47px;      /* 🔽 تحكم مباشر في سماكة الشريط */
  box-sizing: border-box;
}


/* ======= زر العودة ======= */
.back-btn {
    position: relative;
    top: var(--back-btn-top);
    left: var(--back-btn-left);
    background: linear-gradient(120deg, #ffffff, #f0f0f0);
    color: #333;
    border-radius: 25px;
    padding: 8px 18px;
    font-weight: bold;
    text-decoration: none;
    box-shadow: 4px 4px 12px #000000, -4px -4px 12px #ffffff29;
    transition: all 0.2s ease-in-out;
}

.back-btn:hover {
    transform: translateY(-2px);
    box-shadow: 6px 6px 15px #aaa, -6px -6px 15px #fff;
}

/* ======= السلة ======= */
.cart-menu-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cart-button {
  background: linear-gradient(120deg, #ffffff, #f0f0f0);
  color: #ca0b0b;
  border: none;
  padding: 8px 18px;
  border-radius: 25px;
  font-weight: bold;
  position: relative;
  box-shadow: 4px 4px 12px #000000, -4px -4px 12px #ffffff04;
  transition: all 0.2s ease-in-out;
}

.cart-button:hover {
  transform: translateY(-2px);
  box-shadow: 6px 6px 15px #aaa, -6px -6px 15px #fff;
}

.cart-count {
  background: red;
  color: white;
  border-radius: 50%;
  padding: 2px 7px;
  font-size: 12px;
  font-weight: bold;
  position: absolute;
  top: -8px;
  left: -8px;
}

/* ====== MODAL: التراكب والنافذة المتمركزة ====== */
#modalOverlay {
  display: none;
  position: fixed;
  inset: 0; /* top:0; right:0; bottom:0; left:0; */
  background: rgba(0,0,0,0.45);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  z-index: 2000;
}

/* الحاوية الأساسية للـ modal */
/* الحاوية الأساسية للـ modal */
.all-reviews-modal {
  display: none; /* مخفية من الأول */
  position: fixed;
  inset: 0;
  z-index: 2001;
  justify-content: center;
  align-items: center;
  pointer-events: none;
}

/* لما نضيف active */
.all-reviews-modal.active {
  display: flex;   /* تبان فقط هنا */
  pointer-events: auto;
}


/* صندوق التعليقات نفسه (متمركز ثابت) */
.reviews-container {
  position: relative; /* داخل الـ modal */
  width: min(720px, 92%);
  max-width: 92%;
  max-height: calc(100vh - 80px); /* يضمن ألا يخرج عن الشاشة */
  overflow-y: auto;
  background: #ffffff;
  border-radius: 12px;
  padding: 18px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.35);
  box-sizing: border-box;
}

/* زر الإغلاق داخل الصندوق */
.reviews-container .close-button {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 20px;
  cursor: pointer;
  background: transparent;
  border: none;
}

/* منع تحرّك/تفاعل الخلفية أثناء فتح المودال */
body.modal-open {
  overflow: hidden; /* يمنع التمرير للخلفية */
}

/* نوقف التفاعلات والحركات على عناصر الصفحة الخلفية أثناء فتح المودال */
body.modal-open .product-details,
body.modal-open .product-layout,
body.modal-open .product-gallery,
body.modal-open .product-info,
body.modal-open .top-bar {
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
}

/* نعطّل تأثير :hover المؤذي عند فتح المودال */
body.modal-open .product-details,
body.modal-open .product-details:hover {
  transition: none !important;
  transform: none !important;
}

