/* ==========================================================================
   Product Details Styles (productDetails.css) - نالش
   يحتوي على: تنسيقات صفحة تفاصيل المنتج، حاوية الصورة، الخيارات (Chips)، وشريحة التاجر
   ========================================================================== */

/* ----------------------------------
   1. الهيكل الأساسي لصفحة التفاصيل
------------------------------------- */
/* إزالة الحواف الداخلية لكي تتمدد الصورة لأطراف الشاشة */
#product-detail-page .page-body { 
    padding: 0; 
}

/* ----------------------------------
   2. حاوية صورة المنتج
------------------------------------- */
.pd-image-container { 
    width: 100%; 
    height: 50vh; 
    background-color: var(--border); /* لون محايد كخلفية للصورة */
    position: relative; 
}

/* عرض الصورة بجودتها وحجمها الكامل دون قص */
.pd-image-container .image-container-wrapper img { 
    object-fit: contain !important; 
    background-color: var(--bg-card); /* خلفية مريحة للعين للصور المفرغة */
}

/* تدرج لوني ناعم أسفل الصورة لدمجها مع المحتوى الأبيض */
.pd-image-container::after { 
    content: ''; 
    position: absolute; 
    bottom: 0; 
    left: 0; 
    width: 100%; 
    height: 30%; 
    background: linear-gradient(to top, var(--bg-body), transparent); 
    z-index: 3; 
}

/* ----------------------------------
   3. حاوية المحتوى (الاسم، السعر، الوصف)
------------------------------------- */
/* صندوق منحني يصعد فوق الصورة قليلاً */
.pd-content { 
    padding: 30px 25px; 
    background: var(--bg-body); 
    border-top-left-radius: 30px; 
    border-top-right-radius: 30px; 
    margin-top: -30px; 
    position: relative; 
    z-index: 4; 
    box-shadow: 0 -10px 20px rgba(0,0,0,0.05); /* ظل خفيف ليعطي عمق */
}

#pd-name { 
    font-size: 2.2rem; 
    font-weight: 900; 
    line-height: 1.3; 
    margin-bottom: 10px; 
    color: var(--text-main);
}

#pd-price { 
    font-size: 2rem; 
    font-weight: 900; 
    color: var(--primary); 
    display: block; 
    margin-bottom: 20px; 
    transition: 0.3s;
}

#pd-desc { 
    color: var(--text-muted); 
    font-size: 1.1rem; 
    line-height: 1.8; 
    margin: 20px 0; 
}

/* ----------------------------------
   4. خيارات المنتج (مقاسات، ألوان - Option Chips)
------------------------------------- */
.option-chip { 
    display: inline-block; 
    padding: 10px 20px; 
    margin: 0 0 10px 10px; 
    border: 2px solid var(--border); 
    border-radius: 12px; 
    cursor: pointer; 
    font-weight: 700; 
    transition: all 0.3s ease; 
    background: var(--bg-card); 
    color: var(--text-main);
}

.option-chip.selected { 
    border-color: var(--primary); 
    background: rgba(79,70,229,0.1); 
    color: var(--primary); 
    transform: translateY(-2px); 
    box-shadow: var(--shadow-sm);
}

/* ----------------------------------
   5. شريحة التاجر داخل صفحة المنتج (Merchant Chip)
------------------------------------- */
.pd-merchant-chip {
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 12px 15px;
    border-radius: 16px;
    margin: 15px 0 20px 0;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    cursor: pointer;
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.pd-merchant-chip:hover {
    background: rgba(0, 0, 0, 0.02);
    transform: translateY(-2px);
}
.dark-mode .pd-merchant-chip:hover {
    background: rgba(255, 255, 255, 0.02);
}

.pd-merchant-chip .chip-top {
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

.pd-merchant-chip .chip-icon {
    color: var(--primary);
    font-size: 0.85rem;
}

.pd-merchant-chip .chip-name {
    font-size: 1rem;
    font-weight: 900;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pd-merchant-chip .chip-bottom {
    display: flex;
    justify-content: flex-end; /* ليتوافق مع اتجاه RTL */
    margin-top: 4px;
    width: 100%;
}

.pd-merchant-chip .chip-username {
    background: rgba(168, 85, 247, 0.15); 
    color: #a855f7; 
    font-size: 0.8rem;
    font-weight: 800;
    padding: 4px 12px;
    border-radius: 6px;
    direction: ltr; /* لضمان ترتيب الـ @ بشكل صحيح */
    display: inline-block;
}

/* ----------------------------------
   6. قسم المنتجات ذات الصلة
------------------------------------- */
.related-products-section { 
    padding: 30px 0; 
    background: var(--bg-body); 
}

.related-products-section h3 { 
    font-size: 1.6rem; 
    font-weight: 900; 
    padding: 0 25px 20px 25px; 
    color: var(--text-main);
}